From f1fc4e2e678899eb57ea44e659e6dabc43fd83d2 Mon Sep 17 00:00:00 2001 From: SibghatCodora Date: Thu, 11 Apr 2024 15:04:55 +0500 Subject: [PATCH] type error fixed --- src/utils/helpers.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/helpers.ts b/src/utils/helpers.ts index 485581d..4454fd0 100644 --- a/src/utils/helpers.ts +++ b/src/utils/helpers.ts @@ -513,6 +513,9 @@ export const getSnapHodlConfigTradingVolumeBalance = async ( if(!minimumTradingBalance || minimumTradingBalance === 0 || balanceBN.isGreaterThanOrEqualTo(minimumTradingBalance)){ totalBalance = totalBalance.plus(balanceBN); if (totalTradingVolume[address]) { + if(typeof totalTradingVolume[address] === "string" || totalTradingVolume[address] instanceof String){ + totalTradingVolume[address] = new BigNumber(totalTradingVolume[address]); + } totalTradingVolume[address] = totalTradingVolume[address].plus(balanceBN); } else {