From c058671c530cf886dcc584592fc292e98964f7ca Mon Sep 17 00:00:00 2001 From: Thibault Jaillard Date: Thu, 1 Feb 2024 09:52:13 -0500 Subject: [PATCH] Remove tmp fix --- src/utils/lumClient.ts | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/src/utils/lumClient.ts b/src/utils/lumClient.ts index d569a7c1..4841d3c9 100644 --- a/src/utils/lumClient.ts +++ b/src/utils/lumClient.ts @@ -115,23 +115,8 @@ class LumClient { while (true) { const resDeposits: QueryDepositsResponse = await this.client.queryClient.millions.accountDeposits(address, pageDeposits); - const fixedDeposits: Deposit[] = []; - //FIXME: remove this when the chain is fixed - for (const deposit of resDeposits.deposits) { - if (deposit.state !== DepositState.DEPOSIT_STATE_SUCCESS) { - const fixedDeposit = await this.client?.queryClient.millions.poolDeposit(Long.fromNumber(2), deposit.depositId); - - if (fixedDeposit) { - fixedDeposits.push(fixedDeposit); - continue; - } - } - - fixedDeposits.push(deposit); - } - - deposits.push(...fixedDeposits); + deposits.push(...resDeposits.deposits); // If we have pagination key, we just patch it, and it will process in the next loop if (resDeposits.pagination && resDeposits.pagination.nextKey && resDeposits.pagination.nextKey.length) { @@ -148,18 +133,8 @@ class LumClient { while (true) { const resWithdrawals: QueryWithdrawalsResponse = await this.client.queryClient.millions.accountWithdrawals(address, pageWithdrawals); - const fixedWithdrawals: Withdrawal[] = []; - - //FIXME: remove this when the chain is fixed - for (const withdrawal of resWithdrawals.withdrawals) { - const fixedWithdrawal = await this.client?.queryClient.millions.poolWithdrawal(Long.fromNumber(2), withdrawal.withdrawalId); - - if (fixedWithdrawal) { - fixedWithdrawals.push(fixedWithdrawal); - } - } - withdrawals.push(...fixedWithdrawals); + withdrawals.push(...resWithdrawals.withdrawals); // If we have pagination key, we just patch it, and it will process in the next loop if (resWithdrawals.pagination && resWithdrawals.pagination.nextKey && resWithdrawals.pagination.nextKey.length) {