Skip to content

fix: refresh expired swap quotes before signing - #260

Open
0xApotheosis wants to merge 1 commit into
mainfrom
fix/swap-quote-expiry
Open

0xApotheosis wants to merge 1 commit into
mainfrom
fix/swap-quote-expiry

Conversation

@0xApotheosis

@0xApotheosis 0xApotheosis commented Sep 8, 2026 •

Copy link
Copy Markdown
Member

Description

Delayed network switches/approvals could submit stale swap calldata. Refreshes before signing, rechecks allowance and requires acceptance when terms change. Deploy the backend before the frontend. A wallet dialog already opened can still outlive the quote.

Verification

Request Base USDC → Ethereum FOX with a test wallet. Delay switching or confirm an approval: expect a fresh quote. Mock changed amounts: require acceptance; cancel must stop. Mock refresh HTTP 502 or change wallets: no old transaction may reach signing. Leave the review past expiry: accepting should refresh again. Approval testing requires a transaction; reject the final swap if testing preparation only.

Unsigned Relay quote checked; wallet UI QA remains outstanding.

@vercel

vercel Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
shapeshift-agentic Ready Ready Preview Sep 8, 2026 3:13am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 43 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 7086934c-204c-4dd2-bae5-dba5e0dd23b3

📥 Commits

Reviewing files that changed from the base of the PR and between fe86029 and 42e6f7e.

📒 Files selected for processing (17)
  • apps/agentic-chat/src/components/tools/InitiateSwapUI.tsx
  • apps/agentic-chat/src/components/tools/useSwapExecution.tsx
  • apps/agentic-chat/src/services/swapService.ts
  • apps/agentic-chat/src/utils/__tests__/prepareFreshSwap.test.ts
  • apps/agentic-chat/src/utils/chains/evm/transaction.ts
  • apps/agentic-chat/src/utils/chains/solana/transaction.ts
  • apps/agentic-chat/src/utils/chains/types.ts
  • apps/agentic-chat/src/utils/ensureAllowance.ts
  • apps/agentic-chat/src/utils/prepareFreshSwap.ts
  • apps/agentic-chat/src/utils/sendTransaction.ts
  • apps/agentic-chat/src/utils/swapExecutor.ts
  • apps/agentic-server/src/lib/schemas/swapSchemas.ts
  • apps/agentic-server/src/server.ts
  • apps/agentic-server/src/tools/initiateSwap.ts
  • apps/agentic-server/src/utils/getBebopRate/getBebopRate.ts
  • apps/agentic-server/src/utils/getRelayRate/getRelayRate.ts
  • packages/types/src/rate.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch was successfully deployed

1 active deployment
Preview — 42e6f7e0 Deployed Sep 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant