Merged
Conversation
Add initApprovals method. Remove gas update during initialization. Normalise gas fee values during speed up and cancel. Simplify updateCustodialTransaction method.
dbrans
reviewed
Nov 20, 2023
dbrans
reviewed
Nov 20, 2023
dbrans
reviewed
Nov 20, 2023
dbrans
reviewed
Nov 20, 2023
dbrans
reviewed
Nov 20, 2023
dbrans
reviewed
Nov 20, 2023
dbrans
reviewed
Nov 20, 2023
dbrans
reviewed
Nov 20, 2023
dbrans
reviewed
Nov 20, 2023
dbrans
reviewed
Nov 20, 2023
packages/transaction-controller/src/TransactionController.test.ts
Outdated
Show resolved
Hide resolved
dbrans
reviewed
Nov 21, 2023
packages/transaction-controller/src/TransactionController.test.ts
Outdated
Show resolved
Hide resolved
OGPoyraz
reviewed
Nov 21, 2023
OGPoyraz
reviewed
Nov 21, 2023
OGPoyraz
reviewed
Nov 21, 2023
vinistevam
reviewed
Nov 21, 2023
vinistevam
reviewed
Nov 21, 2023
Use fee market constant.
Update post balance after confirm. Add post balance logging.
Add additional logging.
OGPoyraz
approved these changes
Nov 22, 2023
vinistevam
approved these changes
Nov 22, 2023
3 tasks
mcmire
pushed a commit
that referenced
this pull request
Nov 22, 2023
Re-add initApprovals method to allow client to finish initialisation before creating approvals. Remove unnecessary gas property update during initialisation since transactions are not added to the state until gas properties are updated. Normalise the gas fee values provided to speedUpTransaction and stopTransaction to support the extension arguments. Update the transaction after the afterSign hook to persist any updated properties. Report success to the result callback after publish is skipped to unblock the UI during the MMI flows. Set the value parameter to 0x0 if not specified. Limit properties updated by updateCustodianTransaction so it can initially be used for hash and status updates only, with more general MMI updates continuing to use updateTransaction. Align nonce logic with mobile. Update post transaction balance of swaps transactions after internal transactions.
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
Add multiple fixes to support usage by the extension, including:
getTransactionsmethod to search transactions using the specified criteria and options.initApprovalsmethod to allow client to finish initialisation before creating approvals.speedUpTransactionandstopTransactionto support the extension arguments.afterSignhook to persist any updated properties.valueparameter to0x0if not specified.updateCustodianTransactionso it can initially be used forhashandstatusupdates only, with more general MMI updates continuing to useupdateTransaction.Changelog
@metamask/transaction-controllerTransactionReceipt.transactionIndexandTransactionMeta.swapMetaData.initApprovalsmethod to trigger the approval flow for any pending transactions during initialisation.getTransactionsmethod to search transactions used the given criteria and options.speedUpTransactionandstopTransactionmethods.afterSignhook.beforePublishhook.postTxBalanceafter all swap transactions.Checklist