Skip to content

Commit

Permalink
fix: total USD value (#1234)
Browse files Browse the repository at this point in the history
  • Loading branch information
impelcrypto authored Mar 14, 2024
1 parent e5ac087 commit bfb2bd6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/assets/Account.vue
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,13 @@ export default defineComponent({
[balance, props, currentAccount, ledger, isZkEvm],
() => {
balUsd.value = null;
const lockedBal = isZkEvm.value ? '0' : String(ledger?.value?.locked.toString());
const h160LockedBal =
isZkEvm.value || !isH160.value ? '0' : String(ledger?.value?.locked.toString());
if (!balance.value || !props.nativeTokenUsd) return;
const bal =
Number(ethers.utils.formatEther(balance.value.toString())) +
Number(ethers.utils.formatEther(lockedBal));
Number(ethers.utils.formatEther(h160LockedBal));
balUsd.value = props.nativeTokenUsd * bal;
},
{ immediate: true }
Expand Down

0 comments on commit bfb2bd6

Please sign in to comment.