From 8c060087bd7101de4bb6827c4176430d91643c03 Mon Sep 17 00:00:00 2001 From: snoopy1412 Date: Wed, 30 Oct 2024 12:08:18 +0800 Subject: [PATCH] Remove unnecessary slicing of the deposit array --- src/components/deposit-list.tsx | 20 +++++++++----------- src/components/unstake-deposit-list.tsx | 22 ++++++++++------------ 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/src/components/deposit-list.tsx b/src/components/deposit-list.tsx index f18437c..5d60aa3 100644 --- a/src/components/deposit-list.tsx +++ b/src/components/deposit-list.tsx @@ -70,17 +70,15 @@ const DepositList = forwardRef( {isDepositListLoading ? ( ) : depositList?.length ? ( - depositList - .slice(0, maxCount) - .map((deposit) => ( - handleDepositChange(deposit)} - /> - )) + depositList.map((deposit) => ( + handleDepositChange(deposit)} + /> + )) ) : ( )} diff --git a/src/components/unstake-deposit-list.tsx b/src/components/unstake-deposit-list.tsx index f889809..a58720e 100644 --- a/src/components/unstake-deposit-list.tsx +++ b/src/components/unstake-deposit-list.tsx @@ -47,18 +47,16 @@ const UnstakeDepositList = forwardRef( const content = ( <> {deposits?.length ? ( - deposits - .slice(0, maxCount) - .map((deposit) => ( - handleDepositChange(deposit)} - /> - )) + deposits.map((deposit) => ( + handleDepositChange(deposit)} + /> + )) ) : ( )}