Pay Anything Swap Flow (#2503)

* feat: Swap flow for Pay Anything. [WIP]

* feat: Pay Anything Swap Flow [WIP]

* feat: Pay anything swap flow [WIP]
- Add fiat values for send and receive amounts to swap details confirmation bottomsheet

* feat: Pay anything swap flow [WIP]
- Switch exchangeviewmodel back to factory
- Expand address box to fill width

* Handle second swipe to swap cta

* Add fiat for receive amount

* Scope Observers for bottomsheets and add validator

* fix: Repeated instances issue for exchangeVM

* fix: Estimated fee and balance not correctly updating after wallet switching occurs

* fix: Available balance not updating properly after wallet switching

* fix: Available balance and fee rate not displaying after wallet is switched in pay anything flow
This commit is contained in:
David Adegoke
2025-09-07 01:31:56 +03:00
committed by GitHub
parent d1b62f2664
commit 198a9a122b
2 changed files with 29 additions and 13 deletions
+7 -1
View File
@@ -3,10 +3,10 @@ import 'dart:async';
import 'package:cake_wallet/core/open_crypto_pay/open_cryptopay_service.dart';
import 'package:cake_wallet/entities/priority_for_wallet_type.dart';
import 'package:cake_wallet/src/screens/receive/widgets/currency_input_field.dart';
import 'package:cake_wallet/src/widgets/bottom_sheet/info_bottom_sheet_widget.dart';
import 'package:cake_wallet/src/widgets/bottom_sheet/payment_confirmation_bottom_sheet.dart';
import 'package:cake_wallet/src/widgets/bottom_sheet/wallet_switcher_bottom_sheet.dart';
import 'package:cake_wallet/src/widgets/bottom_sheet/swap_confirmation_bottom_sheet.dart';
import 'package:cake_wallet/src/widgets/bottom_sheet/info_bottom_sheet_widget.dart';
import 'package:cake_wallet/src/widgets/picker.dart';
import 'package:cake_wallet/src/widgets/standard_checkbox.dart';
import 'package:cake_wallet/src/screens/exchange/widgets/currency_picker.dart';
@@ -776,6 +776,12 @@ class SendCardState extends State<SendCard> with AutomaticKeepAliveClientMixin<S
noteController.text = initialPaymentRequest!.note;
}
reaction((_) => sendViewModel.isReadyForSend, (bool isReadyForSend) {
if (isReadyForSend) {
sendViewModel.updateSendingBalance();
}
});
_effectsInstalled = true;
}