Skip to content

fix: cp-7.44.0 STAKE-1005 refresh staking data when staking txs are confirmed#14520

Merged
Matt561 merged 2 commits into
mainfrom
feat/stake-1005-refresh-staking-data-when-staking-txs-are-confirmed
Apr 8, 2025
Merged

fix: cp-7.44.0 STAKE-1005 refresh staking data when staking txs are confirmed#14520
Matt561 merged 2 commits into
mainfrom
feat/stake-1005-refresh-staking-data-when-staking-txs-are-confirmed

Conversation

@Matt561

@Matt561 Matt561 commented Apr 8, 2025

Copy link
Copy Markdown
Contributor

Description

This PR aims to fix missing pooled-staking data refreshing when a transaction is confirmed using the redesigned confirmation screens.

Changes:

  • Bumped the @metamask/earn-controller dependency to ^11.0.0
  • Removed existing calls to refreshPooledStakes in transaction subscription handlers
  • Added new TransactionController:transactionConfirmed event to EarnController messengers

Related issues

Fixes:

Manual testing steps

Prerequisite:

  • Ensure you have ETH to stake.
  • Update your local .js.env file to include the following variables
export FEATURE_FLAG_REDESIGNED_STAKING_TRANSACTIONS=true
export FEATURE_FLAG_REDESIGNED_SIGNATURES=true

To test the unstaking flow, we must first stake some ETH. You can skip this part if you have Staked Ethereum already.

  1. From the token list home screen, click on Ethereum or Staked Ethereum

  2. On the Ethereum token details screen, click "stake" or "stake more"

  3. Stake a valid amount of ETH and continue to the confirmation screen

  4. Review and confirm your stake

  5. To unstake, click on Ethereum or Staked Ethereum from the token list screen

  6. Click "unstake" (only visible if you have Staked ETH already)

  7. Enter a valid amount to unstake and continue to the confirmation screen

  8. Review and confirm your unstake transaction

  9. Wait for smart transaction success

  10. After your transaction is confirmed, return to the Ethereum token details screen and you should see a new blue unstaking banner.

Screenshots/Recordings

stake-1005-refresh-staking-data-when-staking-txs-are-confirmed-with-redesigned-confirmation-screens.mov

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.

@Matt561 Matt561 requested a review from a team as a code owner April 8, 2025 17:21
@Matt561 Matt561 requested a review from a team April 8, 2025 17:21
@Matt561 Matt561 requested a review from a team as a code owner April 8, 2025 17:21
@socket-security

Copy link
Copy Markdown

Updated dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@metamask/earn-controller@0.10.00.11.0 None 0 113 kB metamaskbot

View full report↗︎

@github-actions

github-actions Bot commented Apr 8, 2025

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.

@metamaskbot metamaskbot added the team-identity-deprecated DEPRECATED: team no longer exists label Apr 8, 2025
@Matt561 Matt561 changed the title cp-7.44.0 fix: STAKE-1005 refresh staking data when staking txs are confirmed fix: cp-7.44.0 STAKE-1005 refresh staking data when staking txs are confirmed Apr 8, 2025
@sonarqubecloud

sonarqubecloud Bot commented Apr 8, 2025

Copy link
Copy Markdown

@Matt561 Matt561 added Run Smoke E2E and removed team-identity-deprecated DEPRECATED: team no longer exists labels Apr 8, 2025
@github-actions

github-actions Bot commented Apr 8, 2025

Copy link
Copy Markdown
Contributor

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 0ef98ea
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/d5f7d986-0f77-4ed7-b2a2-35b023040699

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

@sethkfman sethkfman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@Matt561 Matt561 added this pull request to the merge queue Apr 8, 2025
Merged via the queue into main with commit db7e9e0 Apr 8, 2025
@Matt561 Matt561 deleted the feat/stake-1005-refresh-staking-data-when-staking-txs-are-confirmed branch April 8, 2025 20:52
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 8, 2025
@metamaskbot metamaskbot added the release-7.45.0 Issue or pull request that will be included in release 7.45.0 label Apr 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.45.0 Issue or pull request that will be included in release 7.45.0 team-earn

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants