-
Notifications
You must be signed in to change notification settings - Fork 16
Fix currency flag inconsistency between selection menu and order book #228
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
- Add getFlagFromCurrencyData() method to CurrencyUtils that uses correct emoji data from fiat.json - Update order book cards to use proper currency flags from JSON data instead of algorithmic generation - Convert OrderAmountCard to ConsumerWidget for currency provider access - Update all order-related screens to use consistent flag display logic
WalkthroughThe changes update how currency flag emojis are retrieved throughout the codebase. Instead of using a static utility function, widgets now obtain currency data via a provider and use a new method that considers this data. This required updating widget types, build method signatures, and introducing a new utility method. Changes
Sequence Diagram(s)sequenceDiagram
participant Widget
participant Provider as currencyCodesProvider
participant CurrencyUtils
Widget->>Provider: watch(currencyCodesProvider)
Provider-->>Widget: currencyData
Widget->>CurrencyUtils: getFlagFromCurrencyData(currencyCode, currencyData)
CurrencyUtils-->>Widget: flag emoji
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (5)
🧰 Additional context used📓 Path-based instructions (2)lib/**/*.dart📄 CodeRabbit Inference Engine (CLAUDE.md)
Files:
**/*.dart📄 CodeRabbit Inference Engine (CLAUDE.md)
Files:
🧠 Learnings (5)lib/features/trades/widgets/trades_list_item.dart (10)Learnt from: CR Learnt from: CR Learnt from: chebizarro Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: chebizarro Learnt from: chebizarro Learnt from: CR Learnt from: CR lib/features/order/screens/take_order_screen.dart (10)Learnt from: chebizarro Learnt from: CR Learnt from: CR Learnt from: chebizarro Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: chebizarro lib/features/home/widgets/order_list_item.dart (11)Learnt from: CR Learnt from: CR Learnt from: chebizarro Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: chebizarro Learnt from: CR Learnt from: CR Learnt from: CR Learnt from: CR lib/shared/widgets/order_cards.dart (4)Learnt from: CR Learnt from: CR Learnt from: chebizarro Learnt from: chebizarro lib/shared/utils/currency_utils.dart (1)Learnt from: CR 🔇 Additional comments (7)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 (
|
grunch
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.
LGTM
Summary by CodeRabbit