-
Notifications
You must be signed in to change notification settings - Fork 198
feat: near intents handle amount too low #11255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughAdd error handling for "Amount is too low" API responses in the NEAR Intents swapper. When the API returns this error, the code extracts the minimum required amount via regex and returns a TradeAmountTooSmall error. Existing token validation error handling is preserved. Changes
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~15 minutes
Possibly Related PRs
Suggested Reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (6)**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/swapper{s,}/**/*.{ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/error-handling.mdc)
Files:
**/*.{js,jsx,ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/naming-conventions.mdc)
Files:
packages/swapper/**/*.ts📄 CodeRabbit inference engine (.cursor/rules/swapper.mdc)
Files:
packages/swapper/src/swappers/**/*.ts📄 CodeRabbit inference engine (.cursor/rules/swapper.mdc)
Files:
🧠 Learnings (20)📓 Common learnings📚 Learning: 2025-11-24T21:20:17.804ZApplied to files:
📚 Learning: 2025-11-03T22:31:30.786ZApplied to files:
📚 Learning: 2025-11-12T12:18:00.863ZApplied to files:
📚 Learning: 2025-11-24T21:20:57.909ZApplied to files:
📚 Learning: 2025-11-12T13:01:06.086ZApplied to files:
📚 Learning: 2025-11-24T21:20:57.909ZApplied to files:
📚 Learning: 2025-11-03T05:46:24.190ZApplied to files:
📚 Learning: 2025-11-24T21:20:57.909ZApplied to files:
📚 Learning: 2025-11-24T21:20:57.909ZApplied to files:
📚 Learning: 2025-11-24T21:20:57.909ZApplied to files:
📚 Learning: 2025-11-24T21:20:57.909ZApplied to files:
📚 Learning: 2025-08-11T09:46:41.060ZApplied to files:
📚 Learning: 2025-11-24T21:20:57.909ZApplied to files:
📚 Learning: 2025-07-31T03:51:48.479ZApplied to files:
📚 Learning: 2025-11-24T21:20:57.909ZApplied to files:
📚 Learning: 2025-11-24T21:20:57.909ZApplied to files:
📚 Learning: 2025-11-24T21:20:57.909ZApplied to files:
📚 Learning: 2025-11-24T21:20:57.909ZApplied to files:
📚 Learning: 2025-11-24T21:20:17.804ZApplied to files:
🧬 Code graph analysis (2)packages/swapper/src/swappers/NearIntentsSwapper/swapperApi/getTradeQuote.ts (3)
packages/swapper/src/swappers/NearIntentsSwapper/swapperApi/getTradeRate.ts (3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (5)
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. Comment |
NeOMakinG
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.

Description
TODO: test me when Near Intents API is back online
Does what it says on the box
Issue (if applicable)
closes #11253
Risk
Low/None
Testing
Engineering
Operations
Screenshots (if applicable)
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.