fix(widget): show receiving-chain receipt row for non-EVM-hash bridges#751
Open
chybisov wants to merge 1 commit into
Open
fix(widget): show receiving-chain receipt row for non-EVM-hash bridges#751chybisov wants to merge 1 commit into
chybisov wants to merge 1 commit into
Conversation
The "Bridge completed" receipt row was dropped for bridges whose destination tx hash is not a 0x-prefixed EVM hash (e.g. Lighter via Relay). getTransactionLink rejected such hashes on EVM chains and returned undefined, so StepActionsList filtered the row out. Build the link from the chain explorer + path override instead of bailing out: skip the EVM hash check when a chain-specific override is registered, and fall back to the SDK-provided txLink otherwise. Add a Lighter (ChainId.LTR) override using its logs/accounts explorer paths.
E2E Examples — failuresThe following example(s) failed:
See the workflow run for Playwright reports and logs. |
effie-ms
reviewed
May 28, 2026
| const validForEvm = | ||
| config.resolvedChain?.chainType !== ChainType.EVM || | ||
| config.hasOverride || | ||
| isHex(txHash, { strict: false }) |
Contributor
There was a problem hiding this comment.
Trying to understand: if we have an override - the hash is valid if it is hex, even if it's not visible on chain (isHex(txHash, { strict: false })). And then shouldn't we use isHex(txHash, { strict: true }) for EVM with no overrides? To still validate its presence on chain?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Which Linear task is linked to this PR?
EMB-396 — Widget UI missing "bridge completed" + dest tx link
Why was it implemented this way?
Bug: The "Bridge completed" receipt row was missing for bridges whose destination transaction hash is not a
0x-prefixed EVM hash. Reproduced with a USDC Arbitrum → Lighter route via Relay: the Across leg showsBridge transaction confirmed+Bridge completed, but the Lighter leg only showsBridge transaction confirmed.Root cause: The SDK correctly adds a
RECEIVING_CHAINaction (status: DONE, with bothtxHashandtxLink). The widget then dropped the row inStepActionsList, whose filter requires a truthyhref.useExplorer.getTransactionLinkwas returningundefinedbecause Lighter is registered as an EVM chain (ChainId.LTR = 3586256) and its destination hash (609af30b…, 80 chars, no0x) fails the strictisHexcheck that exists to guard against relayer task-IDs producing dead Etherscan links.Fix:
getTransactionLinknow skips the EVM hash check when a chain-specific override is registered (an explicit signal the chain's explorer accepts a non-hex hash), and relaxes the remaining EVM check to non-strict. It falls back to the SDK-providedtxLinkonly when no link can be built.txPath: 'logs',addressPath: 'accounts'(→https://lighter.exchange/explorer/logs/<hash>and…/accounts/<addr>).txHash ? … : txLink ? …call sites inStepActionsListandStepActioninto a singlegetTransactionLink({ txHash, txLink, chain })call (props type relaxed to both-optional).Alternatives considered: Falling back to the SDK's
txLinkalone is insufficient — the status API currently returns the wrong path (/tx/instead of/logs/) for Lighter, so relying on it would produce a broken link. Building the URL from the registered override is the source of truth.Visual showcase (Screenshots or Videos)
Before: Lighter receipt shows only "Bridge transaction confirmed" + "Sent to wallet".
After: "Bridge completed" row renders, linking to
https://lighter.exchange/explorer/logs/<hash>.No runtime screenshot attached — reproducing requires a live Lighter route; change verified via type-check, lint, unit tests, and source tracing.
Checklist before requesting a review