fix: transaction id row - #44188
Conversation
Off-chain failures (e.g. user reject) fall back to MetaMask meta ids in activity hash; only show Transaction Id and explorer links for valid EVM hashes or non-EVM chain ids. Co-authored-by: Cursor <cursoragent@cursor.com>
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
✨ Files requiring CODEOWNER review ✨👨🔧 @MetaMask/core-extension-ux (3 files, +25 -5)
|
| <Row | ||
| label={t('transactionIdLabel')} | ||
| value={<TransactionId value={sourceTxHash} />} | ||
| value={txId ? <TransactionId value={txId} /> : null} |
|
Builds ready [6ac9e0b]
⚡ Performance Benchmarks (Total: 🟢 17 pass · 🟡 8 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
🧪 Validation RunVerdict: Note Trial run of the MetaMask evidence skills — The same function, same body, is exported from two modules at this commit:
Both are Separately, each conjunct of the new copy was deleted on its own in CI and the suite re-run. Falsification probe —
|
| Arm | Mutation | Result |
|---|---|---|
| A — baseline | none | Test Suites: 1 passed, 1 total Tests: 23 passed, 23 total |
| B — mutant | shared/lib/transactions.utils.ts:9 replaced |
Test Suites: 1 failed, 1 total Tests: 1 failed, 22 passed, 23 total |
The suite fails when the mechanism is removed and passes when restored, running the same 23 tests in both arms. The test has power.
Failing under mutation:
- ● Transactions utils › isValidTransactionHash › returns false for truncated EVM hashes
Produced by falsify-probe.sh at 2ea45420776402150d9ae18c7e6eb437120cb900 · node v24.13.1 · yarn.lock 09f97e3657b5e353 · 0 tracked changes. Run: https://github.com/MajorLift/metamask-skills/actions/runs/30750283675 — logs and artifacts attached there.
Falsification probe — vacuous
| Arm | Mutation | Result |
|---|---|---|
| A — baseline | none | Test Suites: 1 passed, 1 total Tests: 23 passed, 23 total |
| B — mutant | shared/lib/transactions.utils.ts:9 replaced |
Test Suites: 1 passed, 1 total Tests: 23 passed, 23 total |
The suite passes with the mechanism removed. It does not test what it appears to test.
Produced by falsify-probe.sh at 2ea45420776402150d9ae18c7e6eb437120cb900 · node v24.13.1 · yarn.lock 09f97e3657b5e353 · 0 tracked changes. Run: https://github.com/MajorLift/metamask-skills/actions/runs/30748922870 — logs and artifacts attached there.
Follows from the arms above
- The length check is guarded: dropping it fails
returns false for truncated EVM hashes. isStrictHexStringis not. The tested inputs are a valid hash, a 36-character UUID, and0x1234— all rejected on length, so nothing distinguishes a 66-character hex string from a 66-character non-hex one.- The guard decides whether
getExplorerTxUrlbuilds a block-explorer link, so a value passing it wrongly produces a link that resolves to nothing.
Open for review: the duplicate is the actionable half. The untested conjunct matters only if a producer can put a 66-character non-hex value on that path — the UUID case this change is for is caught on length, and nothing here says what else reaches txHash.


Description
Check the tx identifier before rendering the Transaction Id row. Remediates the issue of always showing the Transaction Id row despite not having a valid transaction hash.
Changelog
CHANGELOG entry: fix: rejected tx showing transaction id link
Related issues
Fixes: #44136
Manual testing steps
Pre-merge author checklist
Pre-merge reviewer checklist
Made with Cursor