-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
refactor: remove global network from transaction controller #4920
refactor: remove global network from transaction controller #4920
Conversation
Remove multichain flag. Remove provider and block tracker constructor options. Temporarily disable handleMethodData method. Remove unnecessary unit tests. Fix unit tests.
Fix logging in multichain helper. Change wipeTransactions arguments to object.
Remove stopAllIncomingTransactionPolling method. Create separate helper loggers per chain.
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
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, thanks for detailed changes in the description.
1137319
@metamaskbot publish-preview |
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions.
|
Explanation
Remove all global network usage from the
@metamask/transaction-controller
package.Specifically:
blockTracker
isMultichainEnabled
onNetworkStateChange
provider
networkClientId
option in calls toaddTransaction
.networkClientId
required inTransactionMeta
type.PendingTransactionTracker
IncomingTransactionHelper
NonceTracker
.wipeTransactions
method arguments with object containing optionalchainId
andaddress
properties.networkClientId
argument in:getNonceLock
estimateGas
estimateGasBuffered
filterToCurrentNetwork
option fromgetTransactions
method.networkClientId
argument tohandleMethodData
method.MethodDataHelper
to encapsulatehandleMethodData
method logic.getProvider
andgetEthQuery
methods withgetNetworkClient
method inMultichainTrackingHelper
.PendingTransactionTracker
andIncomingTransactionHelper
.MultichainTrackingHelper
with additional logs.References
Changelog
See
CHANGELOG.md
.Checklist