Skip to content

Commit

Permalink
Merge pull request #2287 from keep-network/fix-share-of-pool-amount-w…
Browse files Browse the repository at this point in the history
…hen-withdrawning

Fix share of the total pool when withdrawing

When someone withdraw the tokens from the pool, then the share of the total
pool shows wrong value and it is needed to refresh the page.

How to reproduce the bug:

* Log in in Chrome as a user who have some tokens in the pool (for example KEEP +
ETH)
* Log in in Firefox as a user who have some tokens int he pool (for example KKEP
+ ETH)
* Withdraw all tokens as Firefox user
* After 5-10 secs the Chrome user % of the total pool will update and will show
the wrong value. After refresh it shows correct value.

This PR fixes the bug above, so the user doesn't have to refresh the page.
  • Loading branch information
r-czajkowski authored Jan 15, 2021
2 parents 3ffb957 + 0aa14d5 commit b43b735
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion solidity/dashboard/src/reducers/liquidity-rewards.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const liquidityRewardsReducer = (state = initialState, action) => {
lpBalance,
shareOfPoolInPercent: percentageOf(
lpBalance,
restPayload.reward
restPayload.totalSupply
).toString(),
reward: restPayload.reward,
apy: restPayload.apy,
Expand Down

0 comments on commit b43b735

Please sign in to comment.