-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
chore: upgrade transaction controller to 35.0.0 #10263
base: main
Are you sure you want to change the base?
Conversation
Fix swaps gas. Fix send origin. Use failed listener for notification errors. Always permit selected address for internal origins.
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@metamask/[email protected], npm/@metamask/[email protected], npm/@metamask/[email protected] |
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring: Next stepsTake a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with |
@SocketSecurity ignore-all |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is amazing!! Thanks @matthewwalsh0
Left just one comment about the anys in the Engine file!
I have also a question, since we are on the latest version of transaction controller and approval controller, when do you think it will be possible to remove the patches completely?
app/core/Engine.ts
Outdated
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore | ||
getExternalPendingTransactions: (address: string) => | ||
this.smartTransactionsController.getTransactions({ | ||
addressFrom: address, | ||
status: SmartTransactionStatuses.PENDING, | ||
}), | ||
|
||
sign: (transaction, from, transactionMeta) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of any, should we type it as Transaction instead? Also I see TransactionController as any as well, wondering if we could type as TransactionController (if that makes sense)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, just did a bind
to the method directly and cast to the correct type.
Enable simulation.
Thanks Tomas! I'd love to remove both patches as soon as possible once this branch is merged, since I didn't want to delay this work or introduce any more risk and change that would need to be tested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
@matthewwalsh0 iphone.mov |
Description
Upgrade the
TransactionController
from version13.0.0
to35.0.0
.Upgrade the
ApprovalController
from version3.5.2
to7.0.1
.Since both controllers are now at the latest version, the patches contain only the changes that are unique to mobile and not yet added to the
main
core branch.See
TransactionController
patch here.See
ApprovalController
patch here.The following changes are included, organised by
TransactionController
version:33.0.0
AccountsController:getSelectedAccount
action to theTransactionController
messenger.getSelectedAddress
option in theTransactionController
constructor.29.0.0
gasFeeControllerEstimateType
option from call tomergeGasFeeEstimates
.27.0.0
pendingTransactions.isResubmitEnabled
callback.25.0.0
hub
event listeners with subscriptions via the controller messenger.ExtendedControllerMessenger
with helper methods:subscribeOnceIf
tryUnsubscribe
TransactionState
withTransactionControllerState
.config
object inTransactionController
constructor.TransactionMeta
from events as they are now read only.cloneDeep
andupdateTransaction
.onUnapprovedTransaction
inRootRPCMethodsUI.js
due to unstable dependencies.useSwapsTransactions
hook.useCallback
inuseMetrics
.dist
to accessCHAIN_IDS
andETHERSCAN_SUPPORTED_NETWORKS
.23.0.0
getNetworkClientRegistry
callback toTransactionController
constructor.NetworkController:stateChange
event to controller messenger.17.0.0
disableSwaps
option inTransactionController
constructor.type
clashing with gas fee & type validation:SET_INDIVIDUAL_TOKEN_TRANSACTION
ETHER_TRANSACTION'
14.0.0
getPermittedAccounts
option toTransactionController
constructor.getPermittedAccounts
implementation to always allow internal origins:process.env.MM_FOX_CODE
TransactionTypes.MMM
Related issues
Fixes: [Pending]
Manual testing steps
Full regression of all transaction flows, including:
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist