1+ import { useQuery } from "@tanstack/react-query" ;
12import { useCallback , useEffect , useMemo , useRef , useState } from "react" ;
23import type { status as OnrampStatus } from "../../../bridge/OnrampStatus.js" ;
34import { ApiError } from "../../../bridge/types/Errors.js" ;
@@ -9,15 +10,14 @@ import type { Status } from "../../../bridge/types/Status.js";
910import { getCachedChain } from "../../../chains/utils.js" ;
1011import type { ThirdwebClient } from "../../../client/client.js" ;
1112import { waitForReceipt } from "../../../transaction/actions/wait-for-tx-receipt.js" ;
13+ import { stringify } from "../../../utils/json.js" ;
1214import type { Account , Wallet } from "../../../wallets/interfaces/wallet.js" ;
1315import type { WindowAdapter } from "../adapters/WindowAdapter.js" ;
1416import {
15- useBridgePrepare ,
1617 type BridgePrepareRequest ,
1718 type BridgePrepareResult ,
19+ useBridgePrepare ,
1820} from "./useBridgePrepare.js" ;
19- import { useQuery } from "@tanstack/react-query" ;
20- import { stringify } from "../../../utils/json.js" ;
2121
2222/**
2323 * Type for completed status results from Bridge.status and Onramp.status
@@ -27,14 +27,14 @@ export type CompletedStatusResult =
2727 | ( { type : "sell" } & Extract < Status , { status : "COMPLETED" } > )
2828 | ( { type : "transfer" } & Extract < Status , { status : "COMPLETED" } > )
2929 | ( { type : "onramp" } & Extract <
30- OnrampStatus . Result ,
31- { status : "COMPLETED" }
32- > ) ;
30+ OnrampStatus . Result ,
31+ { status : "COMPLETED" }
32+ > ) ;
3333
3434/**
3535 * Options for the step executor hook
3636 */
37- export interface StepExecutorOptions {
37+ interface StepExecutorOptions {
3838 /** Prepared quote returned by Bridge.prepare */
3939 request : BridgePrepareRequest ;
4040 /** Wallet instance providing getAccount() & sendTransaction */
@@ -52,7 +52,7 @@ export interface StepExecutorOptions {
5252/**
5353 * Internal flattened transaction type
5454 */
55- export interface FlattenedTx extends RouteTransaction {
55+ interface FlattenedTx extends RouteTransaction {
5656 /** Index in flat array */
5757 _index : number ;
5858 /** Parent step index */
@@ -62,7 +62,7 @@ export interface FlattenedTx extends RouteTransaction {
6262/**
6363 * Public return type of useStepExecutor
6464 */
65- export interface StepExecutorResult {
65+ interface StepExecutorResult {
6666 currentStep ?: RouteStep ;
6767 currentTxIndex ?: number ;
6868 progress : number ; // 0–100
0 commit comments