Skip to content

Commit 5676a8b

Browse files
committed
fix: Use new routes from types lib
1 parent 957b62a commit 5676a8b

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

src/structures/managers/TransactionManager.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class TransactionManager extends EventEmitter {
6969
public async fetch(id: string, cache = true): Promise<Transaction | null> {
7070
if (cache && this.cache.has(id)) return this.cache.get(id)!;
7171
const { transaction } = (await this.client.REST.get(
72-
Routes.accountWalletTransaction(id),
72+
Routes.accountTransaction(id),
7373
)) as RESTGetAPIAccountTransactionResult;
7474
if (!transaction) return null;
7575
const tx = new Transaction(transaction, this.client);
@@ -84,7 +84,7 @@ export class TransactionManager extends EventEmitter {
8484

8585
public async fetchAll(filter: RESTGetAPIAccountTransactionsQuery = {}) {
8686
const { transactions } = (await this.client.REST.get(
87-
Routes.accountWalletTransactions(),
87+
Routes.accountTransactions(),
8888
filter,
8989
)) as RESTGetAPIAccountTransactionsResult;
9090
return transactions.map((t) => new Transaction(t, this.client));
@@ -135,14 +135,11 @@ export class TransactionManager extends EventEmitter {
135135

136136
do {
137137
try {
138-
result = (await this.client.REST.get(
139-
Routes.accountWalletTransactions(),
140-
{
141-
types: [...this._polling],
142-
since: this._lastPoll.toISOString(),
143-
until: now.toISOString(),
144-
},
145-
)) as RESTGetAPIAccountTransactionsResult;
138+
result = (await this.client.REST.get(Routes.accountTransactions(), {
139+
types: [...this._polling],
140+
since: this._lastPoll.toISOString(),
141+
until: now.toISOString(),
142+
})) as RESTGetAPIAccountTransactionsResult;
146143

147144
for (const tx of result.transactions)
148145
transactions.set(tx.id, new Transaction(tx, this.client));

0 commit comments

Comments
 (0)