-
-
Notifications
You must be signed in to change notification settings - Fork 266
refactor: deprecate transaction history and sendFlowHistory properties
#7326
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
Conversation
|
@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. |
history and sendFlowHistory properties
|
Extension draft PR: MetaMask/metamask-extension#38665 |
packages/transaction-controller/src/helpers/IncomingTransactionHelper.test.ts
Show resolved
Hide resolved
Co-authored-by: Matthew Walsh <[email protected]>
…e into fix/remove-history-property
| _sendFlowHistoryToAdd: SendFlowHistoryEntry[], | ||
| ): TransactionMeta { | ||
| // Return the transaction unchanged | ||
| return this.#getTransaction(transactionID) as 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.
Very minor, could use getTransactionOrThrow to avoid the need to cast.
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 05f7fd8
…e into fix/remove-history-property
Explanation
This PR deprecates the
historyandsendFlowHistoryproperties and all the code related.Problem
Extension state size has been identified as a major root cause for the app becoming bricked, particularly for power users. Analysis by the platform team revealed that
historyandsendFlowHistoryare among the biggest contributors to excessive state size, leading to frequent disk writes and the infinite spinner issue.References
fixes https://github.com/MetaMask/MetaMask-planning/issues/2465
Checklist
Note
Deprecates
history/sendFlowHistory, removes history utilities/exports, makes history updates no-ops, and updates controller, types, and tests accordingly.utils/history(addInitialHistorySnapshot,updateTransactionHistory); stop recording mutation history.disableHistoryanddisableSendFlowHistory(kept for backward compatibility; no longer used).updateTransactionSendFlowHistorya no-op returning the transaction unchanged.skipHistory, history notes now just logged).TransactionMeta.history,sendFlowHistory,TransactionHistory, andTransactionHistoryEntryas deprecated.DISPLAYED_TRANSACTION_HISTORY_PATHSandMAX_TRANSACTION_HISTORY_LENGTHfrom package index.historyandsendFlowHistory.Written by Cursor Bugbot for commit 9d2d2b1. This will update automatically on new commits. Configure here.