Skip to content

Fix/swap execution tracker 923 - #1030

Merged
k-deejah merged 4 commits into
Sorokit:mainfrom
EDOHWARES:fix/swap-execution-tracker-923
Oct 21, 2026
Merged

k-deejah merged 4 commits into
Sorokit:mainfrom
EDOHWARES:fix/swap-execution-tracker-923

Conversation

@EDOHWARES

@EDOHWARES EDOHWARES commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request: Fix Hardcoded Explorer URL and Add Abort Cancellation in SwapExecutionTracker (#923)

Description

This PR resolves all requirements from issue #923 to enhance the SwapExecutionTracker component with network-aware explorer URLs, improved progress tracking, and transaction cancellation support.

Problem Statement

  1. Transaction explorer link pointed to hardcoded testnet explorer URL regardless of active network
  2. Progress tracker did not differentiate between transaction signing and ledger consensus confirmation phases
  3. Clicking "Cancel" failed to cancel ongoing RPC status polling workers

Solution Implemented

  • Dynamic Explorer URL Resolution: Explorer base URL is now dynamically resolved based on active network from useSorokit context
  • Enhanced Progress Stepper: Added distinct step badges for "Signing", "Submitted", "Confirming", and "Confirmed" phases
  • Abort Cancellation: Cancel button stops all background polling requests immediately and integrates with provider for network-wide coordination

Changes

Core Implementation

SwapExecutionTracker.tsx

New Imports

  • Added useRef from React for managing timer references
  • Added useSorokit hook to access network context

Type Updates

  • Extended SwapExecutionStatus type to include "signing" status
  • Added optional onCancel callback to component props

Helper Function: getExplorerTxUrl()

function getExplorerTxUrl(
  txHash: string | null | undefined,
  networkName?: string | null,
): string | null

Closes #923
Closes #928
Closes #929
Closes #930

…on in SwapExecutionTracker

- Dynamically resolve explorer base URL based on active network from useSorokit (mainnet/testnet/futurenet)
- Add distinct step badges for 'Signing', 'Submitted', 'Confirming', and 'Confirmed' in progress tracker
- Implement cancel button to stop ongoing RPC status polling workers
- Register cancellation callback with provider for network switch handling
- Add comprehensive tests for network-based explorer URLs and cancellation functionality

Fixes issue Sorokit#923
…on in SwapExecutionTracker

- Dynamically resolve explorer base URL based on active network from useSorokit (mainnet/testnet/futurenet)
- Add distinct step badges for 'Signing', 'Submitted', 'Confirming', and 'Confirmed' in progress tracker
- Implement cancel button to stop ongoing RPC status polling workers
- Register cancellation callback with provider for network switch handling
- Add comprehensive tests for network-based explorer URLs and cancellation functionality

Fixes issue Sorokit#923
@drips-wave

drips-wave Bot commented Oct 21, 2026

Copy link
Copy Markdown

@EDOHWARES Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@EDOHWARES

Copy link
Copy Markdown
Contributor Author

@k-deejah , pls review pr

@k-deejah
k-deejah merged commit 5914d8b into Sorokit:main Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants