From 219f99a2423b580b3083f34b25e7f32837dfd8a3 Mon Sep 17 00:00:00 2001 From: hassnian Date: Wed, 19 Jul 2023 18:42:06 +0500 Subject: [PATCH] fix: incorrect balance --- components/teleport/Teleport.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/components/teleport/Teleport.vue b/components/teleport/Teleport.vue index fadf8e1ada..7f04a240f6 100644 --- a/components/teleport/Teleport.vue +++ b/components/teleport/Teleport.vue @@ -136,11 +136,12 @@ const allowedTransitiosn = { [Chain.STATEMINE]: [Chain.KUSAMA], } const chainBalances = { - [Chain.KUSAMA]: () => identityStore.multiBalances.chains.kusama?.ksm?.balance, + [Chain.KUSAMA]: () => + identityStore.multiBalances.chains.kusama?.ksm?.nativeBalance, [Chain.BASILISK]: () => - identityStore.multiBalances.chains.basilisk?.ksm?.balance, + identityStore.multiBalances.chains.basilisk?.ksm?.nativeBalance, [Chain.STATEMINE]: () => - identityStore.multiBalances.chains.statemine?.ksm?.balance, + identityStore.multiBalances.chains.statemine?.ksm?.nativeBalance, } const isDisabled = (chain: Chain) => { @@ -187,7 +188,8 @@ const myKsmBalance = computed(() => { throw new Error(`Unsupported chain: ${fromChain.value}`) } const balance = Number(getBalance()) || 0 - return balance * Math.pow(10, ksmTokenDecimals.value) + + return balance }) const explorerUrl = computed(() => {