Skip to content
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

Skip adding history entry for empty txMeta diffs #8379

Merged
merged 1 commit into from
Apr 22, 2020

Conversation

whymarrh
Copy link
Contributor

This PR updates the TransactionStateManager update logic to skip adding a history entry when the diff is empty.

As shown in #8377, there are cases when updateTx is called without a diff in the metadata. Both on v7.7.8 and here on develop, the txMeta.history can contain empty arrays. This isn't useful behaviour, as the history is used for debugging and an empty entry doesn't provide any information.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
@whymarrh whymarrh force-pushed the tx-empty-history-entries branch from c83a7aa to 00eac75 Compare April 22, 2020 02:29
Copy link
Member

@rekmarks rekmarks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kumavis kumavis merged commit f2f7034 into MetaMask:develop Apr 22, 2020
@whymarrh whymarrh deleted the tx-empty-history-entries branch April 22, 2020 18:04
Gudahtt pushed a commit that referenced this pull request Apr 28, 2020

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
This backports #8379.
Gudahtt pushed a commit that referenced this pull request Apr 29, 2020

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
This backports #8379.
Gudahtt added a commit that referenced this pull request Apr 29, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…8449)

Backport #8379 to v7.7.9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants