Files
lp-terminal_github/src/lib/swapIntent.ts
T
labrinyang 4e317eff6d LP TERMINAL — terminal-style LP frontend for Robinhood Chain
Static SPA over UP33 (ve(3,3)) + the official Uniswap v2/v3 deployments:
browse and add liquidity across all three, manage CL/v2 positions, one-token
ZAP adds, aggregator vs native swaps, and LP-based limit orders. Ships with a
zero-dependency pool indexer for uniswap discovery.

Browser-wallet signing only; no key material anywhere.
2026-07-17 19:10:30 +08:00

20 lines
523 B
TypeScript

// One-shot handoff "swap this next" — set after a claim confirms, consumed by
// the SWAP tab when it can resolve both tokens.
import type { Address } from 'viem'
export type SwapIntent = { tokenIn: Address; tokenOut: Address; amount: bigint }
let intent: SwapIntent | null = null
export function setSwapIntent(i: SwapIntent) {
intent = i
}
export function peekSwapIntent(): SwapIntent | null {
return intent
}
export function takeSwapIntent(): SwapIntent | null {
const i = intent
intent = null
return i
}