-
Notifications
You must be signed in to change notification settings - Fork 429
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
(1CT) Enable other fee tokens for 1-Click Trading #3969
(1CT) Enable other fee tokens for 1-Click Trading #3969
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Skipped Deployments
|
WalkthroughThe changes in this pull request focus on the Changes
Possibly related PRs
Suggested reviewers
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 eslint
packages/web/hooks/use-swap.tsxOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the config "next/core-web-vitals" to extend from. Please check that the name of the config is correct. The config "next/core-web-vitals" was referenced from the config file in "/packages/web/.eslintrc.json". If you still have problems, please stop by https://eslint.org/chat/help to chat with the team. Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
packages/web/hooks/use-swap.tsx (1)
Line range hint
479-547
: Improved error handling for one-click trading network fees.The implementation properly handles network fee errors and provides clear user options. However, there are some potential improvements:
- The error handling could be more granular to handle specific network fee error types.
- The toast IDs could be more descriptive for better tracking.
- The rejection error message could provide more context.
Consider these improvements:
-const TOAST_ID = networkFeeError - ? "ONE_CLICK_UNAVAILABLE" - : "ONE_CLICK_INSUFFICIENT_OSMO"; +const TOAST_ID = networkFeeError + ? "ONE_CLICK_NETWORK_FEE_ERROR" + : "ONE_CLICK_INSUFFICIENT_OSMO_BALANCE"; -return reject(new Error("Rejected manual approval")); +return reject(new Error("User rejected manual approval for one-click trading transaction")); // Consider adding specific network fee error type handling +if (networkFeeError?.message.includes("insufficient_fee")) { + // Handle insufficient fee specifically +} else if (networkFeeError?.message.includes("out_of_gas")) { + // Handle out of gas specifically +}
Linear Task
https://linear.app/osmosis/issue/FE-1236/1ct-fix-insufficient-osmo-popping-up
Testing and Verifying