Skip to content

Commit

Permalink
fix: incorrect balance
Browse files Browse the repository at this point in the history
  • Loading branch information
hassnian committed Jul 19, 2023
1 parent da36721 commit 219f99a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions components/teleport/Teleport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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(() => {
Expand Down

0 comments on commit 219f99a

Please sign in to comment.