diff --git a/.changeset/mean-starfishes-retire.md b/.changeset/mean-starfishes-retire.md new file mode 100644 index 0000000..6dd5885 --- /dev/null +++ b/.changeset/mean-starfishes-retire.md @@ -0,0 +1,5 @@ +--- +'minotaur-wallet': patch +--- + +Do not display token with amount equal to zero diff --git a/apps/wallet/src/store/reducer/wallet.ts b/apps/wallet/src/store/reducer/wallet.ts index ef06aa7..341ff46 100644 --- a/apps/wallet/src/store/reducer/wallet.ts +++ b/apps/wallet/src/store/reducer/wallet.ts @@ -108,7 +108,13 @@ const updateAddressBalance = ( amount: '0', }; address.balance = addressBalances.amount; - address.tokens = addressBalances.tokens; + address.tokens = addressBalances.tokens.filter(item => { + try{ + return BigInt(item.balance) > 0n + }catch (e){ + return false + } + }); }; const walletSlice = createSlice({