Skip to main content

Variable: PENDING\_SWAP\_PRUNE\_REASONS

gSwap SDK 2.0.0-rc.4


gSwap SDK 2.0.0-rc.4 / PENDING_SWAP_PRUNE_REASONS

Variable: PENDING_SWAP_PRUNE_REASONS

const PENDING_SWAP_PRUNE_REASONS: readonly ["expired", "invalid_unique_key", "chain_rejected", "unconfirmable"]

Defined in: packages/gswap-sdk/dist/index.d.ts:3701

Why the store dropped a pending swap (the reason of PrunedPendingSwap).

  • expired: older than PENDING_SWAP_EXPIRY_MS.
  • invalid_unique_key: its uniqueKey is not a valid apply-results key (1 to 128 characters of A-Za-z0-9._:-). confirmAppliedTrade refuses such a key with INVALID_UNIQUE_KEY before reading anything and always will, so keeping the entry would retry it forever. The SDK never signs such a key; an entry like this is corrupt or foreign.
  • chain_rejected: PendingSwapStore.settle dropped it because a confirmation proved the chain REFUSED the trade (pendingSwapFateFor is forget): it did not happen.
  • unconfirmable: PendingSwapStore.settle dropped it because a confirmation failed in a way that never changes (forget_quietly: the key itself is refused): nothing can be learned.