From e9f789ba26ee42bf52772df7c0adeafbe4e7ae82 Mon Sep 17 00:00:00 2001 From: Evgeny Taktarov Date: Mon, 10 Jun 2024 18:51:42 +0700 Subject: [PATCH] fix: use sort --- features/withdrawals/hooks/contract/useWithdrawalsData.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/withdrawals/hooks/contract/useWithdrawalsData.ts b/features/withdrawals/hooks/contract/useWithdrawalsData.ts index fa6540dd4..592f97d8f 100644 --- a/features/withdrawals/hooks/contract/useWithdrawalsData.ts +++ b/features/withdrawals/hooks/contract/useWithdrawalsData.ts @@ -95,7 +95,7 @@ export const useWithdrawalRequests = () => { const [requestIds, lastCheckpointIndex] = await Promise.all([ contractRpc.getWithdrawalRequests(account).then((ids) => { - return ids.toSorted((aId, bId) => (aId.gt(bId) ? 1 : -1)); + return [...ids].sort((aId, bId) => (aId.gt(bId) ? 1 : -1)); }), contractRpc.getLastCheckpointIndex(), ]);