Adds support re-create approval requests based on unapprovedTx when client restarts#1575
Merged
vinistevam merged 8 commits intomainfrom Aug 16, 2023
Merged
Conversation
OGPoyraz
reviewed
Aug 4, 2023
f979ae5 to
a9a7c6b
Compare
OGPoyraz
previously approved these changes
Aug 4, 2023
packages/transaction-controller/src/TransactionController.test.ts
Outdated
Show resolved
Hide resolved
packages/transaction-controller/src/TransactionController.test.ts
Outdated
Show resolved
Hide resolved
OGPoyraz
approved these changes
Aug 14, 2023
matthewwalsh0
approved these changes
Aug 16, 2023
Merged
MajorLift
pushed a commit
that referenced
this pull request
Oct 11, 2023
MajorLift
pushed a commit
that referenced
this pull request
Oct 11, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
This PR aims to add
initApprovalsfunction to support re-create approval requests based on unapprovedTx when the client restarts. This is an existent function in the extension and it's coming to the core as part of the effort to unify theTransactionControllerin the core and in the extension.Changes:
processApprovalandrequestApprovalto determine if when creates an approval request it should be shown (shouldShowRequest).transactionMatchesNetworkto facilitate the validation of whether a given transaction matches the specified network or chain ID.resolves: https://github.com/MetaMask/MetaMask-planning/issues/959
Changelog
@metamask/transaction-controllerinitApprovalsfunction to support re-create approval requests based on unapprovedTx when the client restartsChecklist