feat(bond): Phase 3.5 payout confirmation actions on mobile#603
Conversation
- Add and to the Action enum - Add helper (none/pending/acknowledged/completed) with retry support - Bond payout screen: hide form on acknowledged/completed, show info + single CLOSE button - My Trades badge: PAYOUT IN PROGRESS on acknowledged; order's real status on completed - Trade Details: extend the previous non-bond message with a bond-paid line; rate hint only if is in history - : accept default to - : keep tracked order untouched on bond acks; preserve current status (don't fall to default) - Notification extractor: return null for the two new actions (no SnackBar fires) - Exhaustive switches in notification mapper/item updated as no-ops (compiler requirement; functional wiring deferred) - l10n: new keys in en/es/it/de/fr - Tests: bond payout helpers 9→17 cases; regression test for
WalkthroughThis PR implements support for two new bond-related actions— ChangesBond Payout Acknowledgement & Completion
🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly Related PRs
Suggested Reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@lib/features/notifications/utils/notification_message_mapper.dart`:
- Around line 98-100: Replace the "TODO: implement title key if needed"
placeholder returned for actions mostro.Action.bondInvoiceAccepted and
mostro.Action.bondPayoutCompleted with a real localized title lookup (e.g., use
the appropriate S.of(context).<orderUpdateTitle> or similar ARB key) inside the
notification message mapper in notification_message_mapper.dart; update the same
placeholder occurrences referenced around lines 204-206 as well, ensuring you
call the correct S.of(context).<key> accessor used elsewhere in this mapper so
no raw string falls back to the user.
In `@lib/l10n/intl_fr.arb`:
- Around line 1591-1595: The new French ARB entries (keys
bondPayoutInProgressBadge, bondInvoiceAcceptedMessage,
bondPayoutCompletedMessage, bondPayoutCompletedWithRating,
bondPayoutCloseButton) currently contain French text but should follow the repo
convention of using English placeholder text for new feature keys; update each
value to an English placeholder equivalent (e.g., "PAYMENT IN PROGRESS", "Mostro
accepted the Lightning invoice you provided to receive your share of the
anti-abuse bond. Please wait for payment to complete.", "You have received
payment of your share of the anti-abuse bond.", "You have received payment of
your share of the anti-abuse bond. You may rate your counterparty.", "CLOSE") so
translations can be added in a follow-up localization PR.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d945bb9e-5423-4a91-8842-b2bb702fd632
📒 Files selected for processing (17)
lib/data/models/enums/action.dartlib/data/models/order.dartlib/features/notifications/utils/notification_data_extractor.dartlib/features/notifications/utils/notification_message_mapper.dartlib/features/notifications/widgets/notification_item.dartlib/features/order/models/order_state.dartlib/features/order/screens/bond_payout_invoice_screen.dartlib/features/trades/widgets/mostro_message_detail_widget.dartlib/features/trades/widgets/trades_list_item.dartlib/l10n/intl_de.arblib/l10n/intl_en.arblib/l10n/intl_es.arblib/l10n/intl_fr.arblib/l10n/intl_it.arblib/shared/utils/bond_payout_helpers.darttest/models/order_test.darttest/shared/utils/bond_payout_helpers_test.dart
Summary by CodeRabbit
New Features
Bug Fixes
Tests