From 8c563f1a3178040da62a8cf9e31ce64f46e2bac9 Mon Sep 17 00:00:00 2001 From: "Ismail Mbarack (Nas)" Date: Fri, 10 Mar 2023 17:36:23 +0800 Subject: [PATCH] transferable bug fix (#22) --- packages/app-providers/src/hooks/useLedger.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/app-providers/src/hooks/useLedger.ts b/packages/app-providers/src/hooks/useLedger.ts index 604551f..0269f54 100644 --- a/packages/app-providers/src/hooks/useLedger.ts +++ b/packages/app-providers/src/hooks/useLedger.ts @@ -196,11 +196,15 @@ const useLedger = ({ apiPromise, selectedAccount, selectedNetwork }: Params) => ? totalBalance .plus(reservedAmount) .minus(vestedAmountRing) + .minus(ledgerData.stakedRing) .minus(totalDepositsAmount) .minus(unbondedRingAmount) .minus(unbondingRingAmount) : BigNumber(0); - const transferableKTON = ktonBalance.minus(unbondedKtonAmount).minus(unbondingKtonAmount); + const transferableKTON = ktonBalance + .minus(ledgerData.stakedKton) + .minus(unbondedKtonAmount) + .minus(unbondingKtonAmount); if (isDataAtPoint) { setMigratedAssetDistribution({