Skip to content

Commit

Permalink
Merge pull request #255 from reservoirprotocol/ted/fix/wallet-bug
Browse files Browse the repository at this point in the history
Fix wallet balance conversion error: trying to convert an object to a BigInt
  • Loading branch information
ted-palmer committed Jun 13, 2023
2 parents de546c6 + 18c3420 commit aee1301
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/navbar/Wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,11 @@ const Wallet = () => {
nonNativeCurrency.coinGeckoId === currency.coinGeckoId
)
balance =
nonNativeBalances && nonNativeBalances[index]
nonNativeBalances &&
nonNativeBalances[index] &&
(typeof nonNativeBalances[index] === 'string' ||
typeof nonNativeBalances[index] === 'number' ||
typeof nonNativeBalances[index] === 'bigint')
? (nonNativeBalances[index] as string | number | bigint)
: 0n
}
Expand Down

2 comments on commit aee1301

@vercel
Copy link

@vercel vercel bot commented on aee1301 Jun 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on aee1301 Jun 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

artblocks-v2 – ./

artblocks-v2-unevenlabs.vercel.app
artblocks-v2-git-main-unevenlabs.vercel.app
artblocks-v2.vercel.app

Please sign in to comment.