feat(orders): show effective fiat/USD rate on market-price offer cards
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
Start in lib/features/home/widgets/order_list_item.dart, where the "Market price" caption sits under the amount on market-price cards, and trace how exchangeRateProvider(<fiatCode>) and the USD rate from the kind 30078 mostro-rates event are read. Done means market-price cards show ~<effective rate> <fiat>/USD using the maker's premium, fixed-sats cards are unchanged, and the card falls back to "Market price" when no rate is available. Locale strings and regenerated golden images are part of the change.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
On the order book, a market-price offer shows its fiat amount and the premium against the market, but not the rate an offer actually represents. With a market-price offer, the user pays/receives market rate × (1 + premium/100); comparing two offers in the same currency means mentally applying each creator's premium to the market rate every time.
Proposal
On market-price offer cards in the public order book (lib/features/home/widgets/order_list_item.dart), replace the "Market price" caption under the amount with the effective cross rate the offer represents once the creator's premium is applied:
effectiveFiatPerBtc = marketFiatPerBtc × (1 + premium/100)
effectiveFiatPerUsd = effectiveFiatPerBtc / usdPerBtc
- Shown for every market-price offer (0% premium, premium, or discount) and any fiat currency.
- Rendered as e.g.
~305.40 CUP/USDusing the active locale's number formatting. - Only in the offer list — not repeated on the take-order or trade screens.
- Fixed-sats offers are unaffected and do not subscribe to rate providers.
- When the rate cannot be computed (the node publishes no rate for that currency, the kind 30078
mostro-ratesevent is missing/expired, or the fetch errors), the card keeps the current "Market price" caption.
The rates come from the existing exchangeRateProvider(<fiatCode>) and the USD rate, both already surfaced by the node's mostro-rates event. This is display logic only: no Rust/core, protocol, or bridge changes.
Reference currency is USD for now; a user-configurable reference could follow later.
Result (reference)
This is the same screen on the v1 app (mobile_mostro), where the feature is already implemented and user-visible — every market-price row shows the effective rate in its card:
Acceptance criteria
- Market-price offer cards show
~<effective rate> <fiat>/USDunder the amount. - Zero-premium, premium and discounted offers all compute correctly from the maker's premium.
- Fixed-sats cards render exactly as they do today (and create no rate providers).
- When no rate is available, the card falls back to "Market price".
- All locales updated; the rate formatted with the active locale.
- Golden images of the offer card regenerated.
- Ngôn ngữ chính
- Dart
- Star
- 11
- Fork
- 9
- Merge trung bình
- 2 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 16
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của MostroP2P/app
-
documentation priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area: ui bug priority: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
NWC: the pay and buyer-invoice readouts are zero-size, so no accessibility tree carries themĐang mởarea: ui bug priority: high
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug: Button "Share logs" does nothingCó thể đã có người làm @Luquitasjeffrey đã nhận 7 ngày trước. Đang mở
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area: rust-core bug priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của MostroP2P/app
Issue tương tự
-
Python example: list a model's scenes and their camerasCó thể đã có người làm @rudraparmar76 đã nhận hôm nay. Đang mởdocumentation good first issue python
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
iamahsanmehmood/openskp#796 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
Plural rendering: first matching part wins, but gen-l10n lets the last one win (=1 shadows one)Đang mởbug help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
crowdin/flutter-sdk#97 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
MrSpideyNihal/lockfeed#16 ·
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
InlitX/GymMane#529 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày