fix: use signature as txhistory key for Solana bridge transactions #6424
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explanation
This change fixes a bug in Solana post-submission logic in which the txHistory key is set to a random uuid instead of the tx hash. This causes txHistory lookups by txHash (for Solana transactions) to fail on the clients
This is not a breaking change, but requires a migration on the clients to set the txHistory key to the
historyItem.status?.srcChain?.txHash
value for Solana transactions. This fixes txHistory items created prior to this version of the bridge-status-controllerMigration script for extension: https://github.com/MetaMask/metamask-extension/pull/35539/files#diff-3cd53aba68cf73714b1dbe70345a0b896589f13d8c3cc370d04393a5c6b4f0d8
This PR also fixes properties for the swap Completed events so that they read data from the txHistory, if it exists
References
Fixes https://consensyssoftware.atlassian.net/browse/SWAPS-2595
Checklist