valora-inc / wallet

The official repository for the Valora mobile cryptocurrency wallet.
https://valora.xyz
Apache License 2.0
178 stars 87 forks source link

fix(earn): Show correct pool amount when LP to deposit is not 1:1 #6121

Closed finnian0826 closed 1 month ago

finnian0826 commented 1 month ago

Description

Also fix TVL, now assume that TVL is always in USD (will add note in hooks).

Test plan

Manual test:

Related issues

Backwards compatibility

Yes

Network scalability

If a new NetworkId and/or Network are added in the future, the changes in this PR will:

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.74%. Comparing base (73ce253) to head (fdad4d3). Report is 1 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/valora-inc/wallet/pull/6121/graphs/tree.svg?width=650&height=150&src=pr&token=ZQBexNu9cz&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=valora-inc)](https://app.codecov.io/gh/valora-inc/wallet/pull/6121?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=valora-inc) ```diff @@ Coverage Diff @@ ## main #6121 +/- ## ========================================== - Coverage 88.75% 88.74% -0.01% ========================================== Files 727 727 Lines 30797 30794 -3 Branches 5627 5320 -307 ========================================== - Hits 27333 27329 -4 - Misses 3420 3421 +1 Partials 44 44 ``` | [Files with missing lines](https://app.codecov.io/gh/valora-inc/wallet/pull/6121?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=valora-inc) | Coverage Δ | | |---|---|---| | [src/earn/EarnPoolInfoScreen.tsx](https://app.codecov.io/gh/valora-inc/wallet/pull/6121?src=pr&el=tree&filepath=src%2Fearn%2FEarnPoolInfoScreen.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=valora-inc#diff-c3JjL2Vhcm4vRWFyblBvb2xJbmZvU2NyZWVuLnRzeA==) | `97.02% <100.00%> (-0.03%)` | :arrow_down: | | [src/earn/PoolCard.tsx](https://app.codecov.io/gh/valora-inc/wallet/pull/6121?src=pr&el=tree&filepath=src%2Fearn%2FPoolCard.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=valora-inc#diff-c3JjL2Vhcm4vUG9vbENhcmQudHN4) | `94.82% <100.00%> (-0.09%)` | :arrow_down: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/valora-inc/wallet/pull/6121/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=valora-inc) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/valora-inc/wallet/pull/6121?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=valora-inc). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=valora-inc) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/valora-inc/wallet/pull/6121?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=valora-inc). Last update [73ce253...fdad4d3](https://app.codecov.io/gh/valora-inc/wallet/pull/6121?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=valora-inc). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=valora-inc).