Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(earn): Show correct fiat and token amount on earn collect screen #6130

Merged
merged 3 commits into from
Oct 3, 2024

Conversation

finnian0826
Copy link
Contributor

@finnian0826 finnian0826 commented Oct 3, 2024

Description

withdrawToken is not 1:1 with depositToken, need to convert withdrawToken balance to depositToken using pricePerShare

Test plan

Without change (mismatch):

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-10-03.at.13.06.53.mp4

With change (no mismatch):

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-10-03.at.13.06.29.mp4

Related issues

  • Fixes N/A

Backwards compatibility

Yes

Network scalability

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

  • Continue to work without code changes, OR trigger a compilation error (guaranteeing we find it when a new network is added)

Copy link

codecov bot commented Oct 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.75%. Comparing base (f49b00e) to head (4f963ff).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##             main    #6130    +/-   ##
========================================
  Coverage   88.75%   88.75%            
========================================
  Files         727      727            
  Lines       30804    30806     +2     
  Branches     5629     5630     +1     
========================================
+ Hits        27341    27343     +2     
- Misses       3264     3419   +155     
+ Partials      199       44   -155     
Files with missing lines Coverage Δ
src/earn/EarnCollectScreen.tsx 96.33% <100.00%> (+0.06%) ⬆️
test/values.ts 100.00% <ø> (ø)

... and 66 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f49b00e...4f963ff. Read the comment docs.

@finnian0826 finnian0826 added this pull request to the merge queue Oct 3, 2024
Merged via the queue into main with commit 36a6b3e Oct 3, 2024
16 checks passed
@finnian0826 finnian0826 deleted the finnian0826/fix-earn-collect-balance branch October 3, 2024 20:44
jeanregisser pushed a commit that referenced this pull request Oct 4, 2024
…6130)

### Description

withdrawToken is not 1:1 with depositToken, need to convert
withdrawToken balance to depositToken using pricePerShare

### Test plan

Without change (mismatch):


https://github.com/user-attachments/assets/160417bf-9047-4a63-ae16-5568c08a6861



With change (no mismatch):


https://github.com/user-attachments/assets/f4e01cd0-9005-4c99-a9b8-2a4d7e013fad



### Related issues

- Fixes N/A

### Backwards compatibility

Yes

### Network scalability

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

- [X] Continue to work without code changes, OR trigger a compilation
error (guaranteeing we find it when a new network is added)
bakoushin pushed a commit that referenced this pull request Oct 17, 2024
…6130)

### Description

withdrawToken is not 1:1 with depositToken, need to convert
withdrawToken balance to depositToken using pricePerShare

### Test plan

Without change (mismatch):


https://github.com/user-attachments/assets/160417bf-9047-4a63-ae16-5568c08a6861



With change (no mismatch):


https://github.com/user-attachments/assets/f4e01cd0-9005-4c99-a9b8-2a4d7e013fad



### Related issues

- Fixes N/A

### Backwards compatibility

Yes

### Network scalability

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

- [X] Continue to work without code changes, OR trigger a compilation
error (guaranteeing we find it when a new network is added)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants