-
Notifications
You must be signed in to change notification settings - Fork 199
fix: trade routing #11560
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
base: develop
Are you sure you want to change the base?
fix: trade routing #11560
Conversation
PR #11520 introduced async asset loading which caused trade and limit order URL routing to break on page refresh. Issue being investigated: LimitOrderInput crashes with 'invalid AssetId' even on fresh /limit visits because limitOrderInput defaults are not being set. Changes so far: 1. AppContext detects trade/limit routes with URL params and skips defaults 2. LimitOrder guards rendering until URL params are initialized Need to investigate: Why /limit (no params) still crashes
📝 WalkthroughWalkthroughThe PR adds URL parameter readiness checks to prevent crashes in trade and limit order flows. It defers default asset initialization until assets are loaded, introduces location-based route detection, and uses refs to track one-time setup operations. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization 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:
**/*.{tsx,jsx}📄 CodeRabbit inference engine (.cursor/rules/error-handling.mdc)
Files:
**/*.{js,jsx,ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/naming-conventions.mdc)
Files:
**/*.{jsx,tsx}📄 CodeRabbit inference engine (.cursor/rules/react-best-practices.mdc)
Files:
**/*.tsx📄 CodeRabbit inference engine (.cursor/rules/react-best-practices.mdc)
Files:
🧠 Learnings (29)📓 Common learnings📚 Learning: 2025-08-08T11:41:36.971ZApplied to files:
📚 Learning: 2025-11-24T21:20:44.637ZApplied to files:
📚 Learning: 2025-11-24T21:20:04.979ZApplied to files:
📚 Learning: 2025-08-14T17:54:32.563ZApplied to files:
📚 Learning: 2025-07-29T15:04:28.083ZApplied to files:
📚 Learning: 2025-08-10T21:09:25.643ZApplied to files:
📚 Learning: 2025-08-22T13:03:36.919ZApplied to files:
📚 Learning: 2025-08-08T15:00:49.887ZApplied to files:
📚 Learning: 2025-08-08T11:40:55.734ZApplied to files:
📚 Learning: 2025-08-22T13:02:58.824ZApplied to files:
📚 Learning: 2025-10-07T03:44:27.350ZApplied to files:
📚 Learning: 2025-11-19T16:59:50.569ZApplied to files:
📚 Learning: 2025-07-29T10:27:23.424ZApplied to files:
📚 Learning: 2025-09-04T17:29:59.479ZApplied to files:
📚 Learning: 2025-11-24T21:20:57.909ZApplied to files:
📚 Learning: 2025-11-24T21:20:57.909ZApplied to files:
📚 Learning: 2025-09-04T10:18:34.140ZApplied to files:
📚 Learning: 2025-11-24T21:20:04.979ZApplied to files:
📚 Learning: 2025-08-15T07:51:16.374ZApplied to files:
📚 Learning: 2025-08-15T07:51:16.374ZApplied to files:
📚 Learning: 2025-08-15T07:51:16.374ZApplied to files:
📚 Learning: 2025-08-11T09:46:41.060ZApplied to files:
📚 Learning: 2025-09-02T00:02:44.889ZApplied to files:
📚 Learning: 2025-11-24T21:20:44.637ZApplied to files:
📚 Learning: 2025-12-27T16:02:52.792ZApplied to files:
📚 Learning: 2025-09-08T15:53:09.362ZApplied to files:
📚 Learning: 2025-08-22T12:58:26.590ZApplied to files:
📚 Learning: 2025-08-22T12:58:36.070ZApplied to files:
🧬 Code graph analysis (1)src/context/AppProvider/AppContext.tsx (5)
⏰ 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 (6)
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 |
Description
fixes trade/limit routing borked on refresh
How to test
Screenshots
https://jam.dev/c/423c869f-2785-47b4-a6e8-6cf866e07a17
Summary by CodeRabbit
Bug Fixes
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.