CakeWallet/lib/view_model/dashboard
David Adegoke eede8fa6c7
CW-959: Swap Status on Transaction Screen (#2247)
* feat(swap-status-monitor): add real-time swap status monitoring and UI updates

- Introduce SwapManager for automatic tracking of active-wallet swaps.
- Automatically queues new or updated trades from the Hive box.
- Periodically fetch and persist swap statuses via the corresponding trade provider.
- Implement start(wallet, providers), stop(), and dispose() for lifecycle control.
- Apply user's ExchangeApiMode(disabled, tor-only, enabled) when fetching updates.
- Remove swaps from the watchlist on any final state (completed, expired, failed).
- Dispose SwapManager in AppState.dispose() to cancel polling and the Hive subscription.

* refactor(swap-status): replace SwapManager with TradeMonitor for improved trade monitoring.

This change improves the flow by simplifying the trade monitoring logic.

- Removes SwapManager class and replace with TradeMonitor implementation
- Update di and Appstate to register and dispose TradeMonitor
- Modify DashboardViewModel to use TradeMonitor instead of SwapManager

* fix: Modify trade monitoring logic to ensure trade timers are properly disposed when wallet switching occurs

* fix(swap-status): Fix receive amount for exchanges showing as .00 because of null values
2025-05-27 00:52:51 +03:00
..
action_list_display_mode.dart Flutter upgrade 2022-10-12 13:09:57 -04:00
action_list_item.dart Automated Integration Tests Flows (#1686) 2024-11-07 16:46:08 +02:00
anonpay_transaction_list_item.dart Automated Integration Tests Flows (#1686) 2024-11-07 16:46:08 +02:00
balance_view_model.dart Fix Scam tokens handling and make it persistent (#2138) 2025-04-03 03:32:00 +02:00
cake_features_view_model.dart Cw 591 in app cake pay integration (#1376) 2024-06-06 06:51:22 +02:00
dashboard_view_model.dart CW-959: Swap Status on Transaction Screen (#2247) 2025-05-27 00:52:51 +03:00
date_section_item.dart Automated Integration Tests Flows (#1686) 2024-11-07 16:46:08 +02:00
desktop_sidebar_view_model.dart Monero update (#1325) 2024-03-14 20:26:00 +02:00
dropdown_filter_item.dart Cw 591 in app cake pay integration (#1376) 2024-06-06 06:51:22 +02:00
dropdown_filter_item_widget.dart New themes (#2239) 2025-05-25 23:11:45 +03:00
filter_item.dart PR fixes 2022-12-26 20:41:21 +02:00
formatted_item_list.dart Automated Integration Tests Flows (#1686) 2024-11-07 16:46:08 +02:00
home_settings_view_model.dart feat: Migrate to EtherScan v2 API for supported EVM chains (#2264) 2025-05-23 00:32:18 +03:00
nft_view_model.dart Handle Network Connection Errors (#2213) 2025-04-25 01:12:56 +03:00
order_list_item.dart Automated Integration Tests Flows (#1686) 2024-11-07 16:46:08 +02:00
payjoin_transaction_list_item.dart implement-payjoin (#1949) 2025-05-12 20:33:14 +03:00
receive_option_view_model.dart Add decred (#1938) 2025-03-21 04:18:47 +02:00
sign_view_model.dart Cw 565 sign messages (#1378) 2024-08-18 02:10:27 +03:00
trade_list_item.dart Add Chainflip exchange provider (#1807) (#1970) 2025-01-24 20:17:37 +02:00
transaction_list_item.dart Remove haven (#2085) 2025-03-21 04:52:05 +02:00
wallet_balance.dart Flutter upgrade 2022-10-12 13:09:57 -04:00