-
Notifications
You must be signed in to change notification settings - Fork 6
Fix wallet #167
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
Fix wallet #167
Conversation
…d ToasterContainer component
…orrow amounts in MarketCard component
WalkthroughAdds react-toastify and a ToasterContainer component integrated into the root layout, enhances error handling in the lend-increase flow to parse and display balance-related toast errors, changes a liquidity hook to rethrow errors, removes Math.floor from market-card displays, and deletes an FAQ entry on the landing page. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI as Component
participant Hook as use-lend-increase
participant Send as Send Operation
participant Toast as ToasterContainer
User->>UI: Initiate lend
UI->>Hook: call lendIncrease()
Hook->>Hook: get token decimals (USDC/XLM/XRP)
Hook->>Send: send transaction
alt success
Send-->>Hook: success
Hook-->>UI: return success
else failure
Send-->>Hook: error with message
Hook->>Hook: parse message for required balance
Hook->>Hook: format amount using token decimals
Hook->>Toast: show error toast (formatted)
Hook-->>UI: throw/propagate error
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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 |
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: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (7)
packages/app/package.json(1 hunks)packages/app/src/app/layout.tsx(2 hunks)packages/app/src/features/liquidity-flow/hooks/use-lend-increase.tsx(4 hunks)packages/app/src/features/liquidity-flow/hooks/use-liquidity.ts(1 hunks)packages/app/src/global/providers/toaster-container.tsx(1 hunks)packages/app/src/widgets/market-section/components/market-card/market-card.tsx(1 hunks)packages/landing/src/widgets/landing/components/question-section/question-section.tsx(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
packages/app/src/app/layout.tsx (1)
packages/app/src/global/providers/toaster-container.tsx (1)
ToasterContainer(6-21)
packages/app/src/features/liquidity-flow/hooks/use-lend-increase.tsx (2)
packages/app/src/features/liquidity-flow/hooks/use-token-info.ts (1)
useTokenInfo(8-42)packages/app/src/features/liquidity-flow/soroban/get-cell-by-position-update.tsx (1)
getCellByPositionUpdate(5-9)
🪛 GitHub Actions: TESTS
packages/app/src/features/liquidity-flow/hooks/use-liquidity.ts
[error] 55-55: Type error: No overload matches this call. Overload 1/2 expect a string or undefined for Error constructor, but argument has type 'unknown'. Ensure the caught error is properly typed or convert to string before throwing.
⏰ 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). (2)
- GitHub Check: test-build-image (app)
- GitHub Check: test-build-image (landing)
Summary by CodeRabbit
New Features
Bug Fixes
Documentation