mirror of
https://github.com/labrinyang/lp-terminal.git
synced 2026-07-27 21:27:43 +00:00
4e317eff6d
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.
20 lines
523 B
TypeScript
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
|
|
}
|