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

refactor(earn): connect pool details to deposit screen #5858

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

satish-ravi
Copy link
Contributor

@satish-ravi satish-ravi commented Aug 28, 2024

Description

Also fixes a small bug in earn prepare transactions with amount units.

Test plan

CI

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:

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

@@ -98,7 +98,7 @@ export async function prepareSupplyTransactions({
feeCurrencies,
baseTransactions,
spendToken: token,
spendTokenAmount: new BigNumber(amount),
spendTokenAmount: new BigNumber(amount).shiftedBy(token.decimals),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is only an issue if the spendToken is also the gas currency. For aave, this can never be the case so there was no user impact

Copy link

codecov bot commented Aug 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.51%. Comparing base (c945336) to head (2e38ef4).
Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##             main    #5858    +/-   ##
========================================
  Coverage   87.50%   87.51%            
========================================
  Files         726      726            
  Lines       31064    31066     +2     
  Branches     5212     5501   +289     
========================================
+ Hits        27183    27186     +3     
+ Misses       3837     3836     -1     
  Partials       44       44            
Files with missing lines Coverage Δ
src/earn/EarnPoolInfoScreen.tsx 88.63% <100.00%> (+1.71%) ⬆️
src/earn/prepareTransactions.ts 88.23% <ø> (ø)
src/viem/prepareTransactions.ts 99.14% <ø> (ø)

... and 1 file 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 c945336...2e38ef4. Read the comment docs.

@@ -268,7 +268,7 @@ export async function tryEstimateTransactions(
*
* @param feeCurrencies
* @param spendToken
* @param spendTokenAmount
* @param spendTokenAmount BigNumber in smallest unit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what exactly does smallest unit mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the smallest unit of the token (e.g., 1ETH => 1e18, 1 usdc => 1e6). I believe we use this term in a few places in the wallet

@satish-ravi satish-ravi added this pull request to the merge queue Aug 29, 2024
Merged via the queue into main with commit 4ae95ed Aug 29, 2024
17 checks passed
@satish-ravi satish-ravi deleted the satish/act-1342-4 branch August 29, 2024 05:36
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.

2 participants