Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

fix(tokemak): Remove claimable balance of "Staked TOKE" label #320

Merged
merged 13 commits into from
Apr 29, 2022

Conversation

zeJabun
Copy link
Contributor

@zeJabun zeJabun commented Apr 29, 2022

Description

Remove the claimable balance within "Staked Toke" since it will always equal to zero. All rewards earned on Tokemak are aggregated and are shown under the "Claimable TOKE" label.

Screen Shot 2022-04-29 at 1 14 42 PM

Checklist

  • [⚡️] I have followed the Contributing Guidelines
  • [⚡️] (optional) As a contributor, my Ethereum address/ENS is: jabun.eth

How to test?

0x9e0bce7ec474b481492610eb9dd5d69eb03718d5
The address above should no longer show a balance named "Claimable" in the Staked TOKE label.

@immasandwich
Copy link
Contributor

immasandwich commented Apr 29, 2022

Hey @zeJabun ! Easier solution would be just to filter in the current getBalances function such that:

const tokens = [stakedTokenBalance, ...rewardTokenBalances].filter(v => v.balanceUSD > 0);
const balanceUSD = sumBy(tokens, t => t.balanceUSD);

That way, we'd have much less code in the balance helper.

@immasandwich immasandwich merged commit ccc4d73 into Zapper-fi:main Apr 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants