-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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: STAKE-898: build select token component for earn products #13258
base: main
Are you sure you want to change the base?
feat: STAKE-898: build select token component for earn products #13258
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
c9898fa
to
889ccdc
Compare
|
0cce0b6
to
f8c0070
Compare
@amitabh94 @nickewansmith The code duplication is 100% in the test mock data. Is there a way to bypass this warning? |
How about having a utility function to generate list of tokens or having a common list for fields used in all tokens like aggregators ? |
18b3b2d
to
2a70144
Compare
|
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.
Tests good, just a few minor comments and questions!
@@ -12,5 +12,6 @@ export const EVENT_LOCATIONS = { | |||
STAKE_CONFIRMATION_VIEW: 'StakeConfirmationView', | |||
UNSTAKE_INPUT_VIEW: 'UnstakeInputView', | |||
UNSTAKE_CONFIRMATION_VIEW: 'UnstakeConfirmationView', | |||
TAB_BAR: 'TabBar', |
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.
Which tab bar is this referring to? I may be missing context about it, but maybe there could be a more descriptive name.
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.
I agree that this is a bit ambiguous. This is the value for other events in the WalletActions.tsx
file. I'll rename it to be more descriptive.
How about WalletActionsBottomSheet
?
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.
A small high level comment but overall LGTM!
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.
We can keep the filtering logic here for now but we can also have this whole logic on the controller side and just fetch the list of tokens that user is eligible to earn on from the Earn controller state.
All the filtering and eligibility check happens on the controller side and UI layer is responsible for only rendering the supported token list for user fetched from the state.
f230c33
to
990d867
Compare
990d867
to
da49fe3
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13258 +/- ##
==========================================
+ Coverage 61.58% 61.88% +0.30%
==========================================
Files 1953 1975 +22
Lines 43442 43903 +461
Branches 5835 5943 +108
==========================================
+ Hits 26753 27170 +417
- Misses 14905 14925 +20
- Partials 1784 1808 +24 ☔ View full report in Codecov by Sentry. |
|
|
Description
This PR adds the
<EarnTokenList />
component which displays a list of supported staking and lending tokens. Portions of the EarnTokenList are still hardcoded until we add data-fetching.Network Switching
Filtering Out Ineligible Tokens
Token Display Order
Reason for change
This is part of the Stablecoin Lending initiative.
Related issues
Manual testing steps
export MM_STABLECOIN_LENDING_UI_ENABLED=true
to your.js.env
fileStake ETH
orDeposit ${token.symbol}
depending on your selection during step 4Screenshots/Recordings
Designs
https://www.figma.com/design/HSYn1fXfnBvDwHvBO1ZZHb/Earn?m=auto&node-id=7079-143568
Before
stake-898-build-token-list-component-before.mov
After
stake-898-build-token-list-component-after.mov
Pre-merge author checklist
Pre-merge reviewer checklist