-
Notifications
You must be signed in to change notification settings - Fork 87
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
feat(TokenEnterAmount): add new flow to EarnEnterAmount.tsx #6246
base: slava/change-send-flow
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## slava/change-send-flow #6246 +/- ##
==========================================================
+ Coverage 88.93% 88.99% +0.06%
==========================================================
Files 739 739
Lines 31593 31521 -72
Branches 5567 5544 -23
==========================================================
- Hits 28097 28053 -44
+ Misses 3449 3421 -28
Partials 47 47
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
<TokenEnterAmount | ||
autoFocus | ||
testID="EarnEnterAmount" | ||
token={inputToken} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will need some special handling for withdraws. It looks like the TokenEnterAmount uses token.balance
to populate "Available", but for withdraws, we actually have to use the LP token balance converted in deposit token (its 1:1 for aave and allbridge pools but not beefy pools). See balanceInInputToken
field above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@satish-ravi I'll provide an option to define where "available" comes from so it can be overwritten!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@satish-ravi updated!
amountType={amountType} | ||
toggleAmountType={handleToggleAmountType} | ||
onOpenTokenPicker={dropdownEnabled ? onOpenTokenPicker : undefined} | ||
tokenBalance={isWithdrawal ? balanceInInputToken : inputToken.balance} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@satish-ravi this should do the trick!
Description
4/5 PR for new Enter Amount component. This PR uses the new component and hook on Earn flow.
Test plan
earn.flow.mp4
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: