Transaction toaster: copy hash and open-in-explorer actions - #994
Merged
Merged
Conversation
Extracted from the intent-based swaps branch (#980) so the toaster improvement can land on its own. In the success state the pill now shows two ghost buttons on the right: copy the transaction hash (with a check-mark confirmation) and open the transaction in the block explorer. The hash is recorded from the `step-pending` broadcast event; the explorer link uses the `explorerUrlTemplate` the step was enqueued with (now set by Send, Swap and Perps deposit forms) and falls back to the URL stored on the local transaction's address action. Hovering or focusing the pill pauses the auto-dismiss countdown so the actions stay reachable, and resumes with a short grace period on leave. The pill is a div with role="button" since it now nests interactive elements; Enter/Space on a nested action no longer also navigates. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
📦 build.zip [updated at Sep 24, 2:13:52 PM UTC] |
For swap and bridge steps the explorer template now comes from `quote.contractMetadata.explorer.txUrl` when the provider supplies one (a bridge tracker that follows both legs), falling back to the input chain's explorer. Approve steps keep the input chain explorer since the provider's tracker wouldn't know the approval hash. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Summary
Extracts the transaction toaster improvement from #980 (intent-based swaps) into its own PR so it can land independently. None of the intent-swap machinery (Order steps, "Still processing" terminal, new queue events) is included.
step-pendingevent. The explorer link uses a new optionalexplorerUrlTemplateonToasterViewand falls back to the explorer URL stored on the local transaction's address action. Send and approve steps use the input chain explorer; swap/bridge steps prefer the quote provider's explorer (quote.contractMetadata.explorer.txUrl, e.g. a bridge tracker) and fall back to the input chain.divwithrole="button"/tabIndex={0}since it nests interactive elements. Enter/Space on a nested action activates the action only; pointer-down on an action does not start a drag.Files
Toaster/ToasterActions.tsx(new, verbatim from Intent based swaps #980)Toaster/useToasterTarget.ts(new, simplified: hash-only matching, no Order ids)Toaster/useToasterSession.ts: hash tracking,setHoveredwith pause/resumeToaster/TransactionToaster.tsx,Toaster/styles.module.cssTransactionSigner/types.ts:explorerUrlTemplate?onToasterViewSendForm2.tsx,SwapForm2.tsx,PerpsDeposit.tsx: pass the templateVerification
tsc --noEmit, eslint and prettier pass on the changed files. Manual QA of the success-state buttons is still to be done.🤖 Generated with Claude Code