Refactor pending transaction tracker#1896
Conversation
Add additional error checks. Refactor unit tests.
Add unit tests.
packages/transaction-controller/src/TransactionController.test.ts
Outdated
Show resolved
Hide resolved
packages/transaction-controller/src/helpers/PendingTransactionTracker.ts
Outdated
Show resolved
Hide resolved
packages/transaction-controller/src/helpers/PendingTransactionTracker.ts
Outdated
Show resolved
Hide resolved
packages/transaction-controller/src/helpers/PendingTransactionTracker.ts
Outdated
Show resolved
Hide resolved
Remove unnecessary type casting. Update coverage targets.
packages/transaction-controller/src/helpers/PendingTransactionTracker.ts
Show resolved
Hide resolved
|
Changelog feedback:
I read this to mean kind of the opposite of what it does ("Use of the new pendingTransactions.isResubmitEnabled constructor option is now disabled" vs "This new behavior can be disabled using the new pendingTransactions.isResubmitEnabled constructor option" Somewhat related, what do you think about inverting the semantics of the new option (keep default behavior; make automatic resubmit opt-in)? I'd consider this a breaking change - users may rely on being notified of any error and handling them explicitly. |
We're trying to avoid hiding large parts of the controller functionality behind feature flags that have to be explicitly enabled, so by default a client gets all the features with minimal configuration, but they can override and disable parts they don't want as the exception. The extension is the larger client and uses this feature for example, but the mobile will be the exception in not using it. You are right though that we should mark this as a breaking change to ensure mobile disables this when adopting to ensure their usage remains the same. |
6744ce2
Refactor the PendingTransactionTracker to align with the extension.
Explanation
Refactor the
PendingTransactionTrackerto align with the extension.This includes:
Changelog
@metamask/transaction-controllerpendingTransactions.isResubmitEnabledconstructor option tofalse.firstRetryBlockNumber,retryCount, andwarningproperties in the transaction metadata.Checklist