Skip to content

feat: STAKE-1005: refresh staking data when staking txs are confirmed#5607

Merged
Matt561 merged 3 commits intomainfrom
feat/stake-1005-refresh-staking-data-when-staking-txs-are-confirmed
Apr 7, 2025
Merged

feat: STAKE-1005: refresh staking data when staking txs are confirmed#5607
Matt561 merged 3 commits intomainfrom
feat/stake-1005-refresh-staking-data-when-staking-txs-are-confirmed

Conversation

@Matt561
Copy link
Copy Markdown
Contributor

@Matt561 Matt561 commented Apr 7, 2025

Explanation

This PR updates the EarnController to refresh a user's pooled-staking data when a staking transaction is confirmed. Non-staking transaction types are ignored.

  • Added a new subscription to the TransactionController:transactionConfirmed event has been added.
  • Added @metamask/transaction-controller has been added as a dev dependency.
  • Added related tests.

References

Jira ticket: [Earn-Controller] Refresh staking data when staking transactions are confirmed

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@Matt561 Matt561 marked this pull request as ready for review April 7, 2025 21:00
@Matt561 Matt561 requested review from a team as code owners April 7, 2025 21:00
Copy link
Copy Markdown
Contributor

@amitabh94 amitabh94 left a comment

Choose a reason for hiding this comment

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

LGTM

@Matt561 Matt561 merged commit ec9b923 into main Apr 7, 2025
199 checks passed
@Matt561 Matt561 deleted the feat/stake-1005-refresh-staking-data-when-staking-txs-are-confirmed branch April 7, 2025 21:06
@Matt561 Matt561 mentioned this pull request Apr 7, 2025
Matt561 added a commit that referenced this pull request Apr 7, 2025
One `@metamask/earn-controller` PR included in this release:
#5607
matallui added a commit that referenced this pull request Apr 9, 2025
* main:
  Fix unmocked block tracker warning in NetworkController tests (#5289)
  ci: GH action to remind developers to add release notes in CHANGELOG.md (#5620)
  Release 355.0.0 (#5619)
  Release 354.0.0 (#5615)
  fix: Update origin in Snap requests (#5616)
  Release/353.0.0 (#5612)
  refactor(accounts-controller): use type-cast instead of `@ts-expect-error` (#5568)
  feat: support external sign transactions (#5604)
  feat: extend isAtomicBatchSupported result (#5600)
  fix: Rename `enableTxParamsGasFeeUpdates` to `isAutomaticGasFeeUpdateEnabled` and also callback (#5602)
  Release/352.0.0 (#5608)
  feat: STAKE-1005: refresh staking data when staking txs are confirmed (#5607)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants