Skip to content

Commit

Permalink
fix: empty reward storage (#1600)
Browse files Browse the repository at this point in the history
  • Loading branch information
euharrison authored Jan 31, 2025
1 parent 92c4b40 commit f9074e9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/namadillo/src/atoms/balance/atoms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,10 @@ export const cachedShieldedRewardsAtom = atom((get) => {
const rewards = get(shieldRewardsAtom);
const data = rewards.isSuccess ? rewards.data : storage[viewingKey.key];

if (!data) {
return { amount: BigNumber(0) };
}

return {
amount: toDisplayAmount(namadaAsset(), BigNumber(data.minDenomAmount)),
};
Expand Down

0 comments on commit f9074e9

Please sign in to comment.