UNPKG

@funkit/connect

Version:

Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.

19 lines (18 loc) 684 B
import { type QuoteBuilder, type QuoteRetryError } from '../../../domains/quoteMode/types'; export type MappedRetryAction = { action: 'calibrate'; newTargetAssetAmount: number; } | { action: 'giveUp'; }; /** * Bridge between the domain-layer `handleRetry` and the React-layer retry loop. * * Calls `quoteBuilder.handleRetry()` and converts the result into a simple * action the hook can act on: * - `calibrate` → call `updateTargetAssetAmount(newTargetAssetAmount)` and re-quote * - `giveUp` → stop retrying, surface the error */ export declare function mapRetryAction(quoteBuilder: QuoteBuilder, params: { error: QuoteRetryError; }): MappedRetryAction;