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

feat: conditionally display stake/earn text based on pooled staking feature flag (#12261) #12263

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

amitabh94
Copy link
Contributor

@amitabh94 amitabh94 commented Nov 12, 2024

Description

Updates StakeButton component to show different text based on whether pooled staking is enabled. Shows "earn" when pooled staking is active, and "stake" when using traditional staking.

Manual testing steps

  1. Set export MM_POOLED_STAKING_UI_ENABLED=true in your local .js.env
    file
  2. Go to Homepage and you should see 'Earn' CTA
  3. Disable the flag in .js.env and then go to homepage , and now you
    should see 'Stake' CTA

Screenshots/Recordings

Before

image

After

image

Pre-merge author checklist

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.

…eature flag (#12261)

## **Description**

Updates StakeButton component to show different text based on whether
pooled
staking is enabled. Shows "earn" when pooled staking is active, and
"stake"
when using traditional staking.

## **Manual testing steps**

1. Set export MM_POOLED_STAKING_UI_ENABLED=true in your local .js.env
file
2. Go to Homepage and you should see 'Earn' CTA 
3. Disable the flag in .js.env and then go to homepage , and now you
should see 'Stake' CTA

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<img width="349" alt="image"
src="https://github.com/user-attachments/assets/475c7593-6c79-4aca-afff-a4be635dd8ea">

### **After**

<img width="346" alt="image"
src="https://github.com/user-attachments/assets/c06ca319-13c8-4e73-9bcf-bbbaaff4fa00">

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] 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.
@amitabh94 amitabh94 requested a review from a team as a code owner November 12, 2024 17:43
Copy link
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.

@amitabh94 amitabh94 added the Run Smoke E2E Triggers smoke e2e on Bitrise label Nov 12, 2024
Copy link
Contributor

github-actions bot commented Nov 12, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 0e37d5b
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/801bcdad-9f6e-4f0b-a888-06df2712155f

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Nov 12, 2024
Copy link

sonarcloud bot commented Nov 12, 2024

@sethkfman sethkfman merged commit 6963be6 into release/7.35.0 Nov 12, 2024
50 of 51 checks passed
@sethkfman sethkfman deleted the feat/cherry-pick-stake-12261 branch November 12, 2024 19:45
@github-actions github-actions bot locked and limited conversation to collaborators Nov 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
INVALID-PR-TEMPLATE PR's body doesn't match template Run Smoke E2E Triggers smoke e2e on Bitrise team-stake
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants