Skip to content

Add Staking entrypoint for Mainnet on Token List Item#22347

Merged
vthomas13 merged 7 commits intodevelopfrom
1781-staking-icon
Jan 9, 2024
Merged

Add Staking entrypoint for Mainnet on Token List Item#22347
vthomas13 merged 7 commits intodevelopfrom
1781-staking-icon

Conversation

@vthomas13
Copy link
Copy Markdown
Contributor

Description

Staking team would like to add an entry point for users to get to Portfolio Staking from the extension.
This PR adds a prop to TokenListItem, which would add the staking button for a given token when the flag is true.
The scope of the story is limited to ETH mainnet, with the expectation that there will be other tokens to stake in the future.

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/1781

Manual testing steps

  1. Go to Token Listing
  2. Verify that the new staking icon shows only for ETH mainnet
  3. Verify that onClick, a new metametrics event is tracked

Screenshots/Recordings

Before

After

image image

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • [] I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@github-actions
Copy link
Copy Markdown
Contributor

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.

@vthomas13 vthomas13 force-pushed the 1781-staking-icon branch 2 times, most recently from 6a2f015 to 2a9e22b Compare December 22, 2023 13:14
@vthomas13 vthomas13 force-pushed the 1781-staking-icon branch 2 times, most recently from 1706088 to cdbe89f Compare January 4, 2024 20:50
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [cdbe89f]
Page Load Metrics (1259 ± 138 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint892821566431
domContentLoaded10188496330
load78616511259288138
domInteractive10188496330
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 982 Bytes (0.01%)
  • common: 50 Bytes (0.00%)

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 4, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (fc8d223) 68.15% compared to head (975c212) 68.17%.
Report is 26 commits behind head on develop.

❗ Current head 975c212 differs from pull request most recent head b41c786. Consider uploading reports for the commit b41c786 to get more accurate results

Files Patch % Lines
...ents/multichain/token-list-item/token-list-item.js 93.33% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #22347      +/-   ##
===========================================
+ Coverage    68.15%   68.17%   +0.01%     
===========================================
  Files         1081     1081              
  Lines        42295    42312      +17     
  Branches     11302    11309       +7     
===========================================
+ Hits         28826    28842      +16     
- Misses       13469    13470       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Contributor

@darkwing darkwing left a comment

Choose a reason for hiding this comment

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

Nicely done!

Copy link
Copy Markdown
Contributor

@darkwing darkwing left a comment

Choose a reason for hiding this comment

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

Actually, a quick accessibility check shows the "Stake" link isn't keyboard-accessible. Could we make that possible?

Co-authored-by: Danica Shen <zhaodanica@gmail.com>
@vthomas13 vthomas13 merged commit dc7cfdc into develop Jan 9, 2024
@vthomas13 vthomas13 deleted the 1781-staking-icon branch January 9, 2024 18:12
@github-actions github-actions bot locked and limited conversation to collaborators Jan 9, 2024
@metamaskbot metamaskbot added the release-11.9.0 Issue or pull request that will be included in release 11.9.0 label Jan 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-11.9.0 Issue or pull request that will be included in release 11.9.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants