mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-01 12:04:21 +01:00
Confirmation checkboxes (#1877)
* feat: confirmation checkboxes * Update lib/src/screens/cake_pay/cards/cake_pay_confirm_purchase_card_page.dart --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
@@ -49,6 +49,13 @@ abstract class CakePayPurchaseViewModelBase with Store {
|
||||
|
||||
String get fiatCurrency => paymentCredential.fiatCurrency;
|
||||
|
||||
bool confirmsNoVpn = false;
|
||||
bool confirmsVoidedRefund = false;
|
||||
bool confirmsTermsAgreed = false;
|
||||
|
||||
@observable
|
||||
bool isPurchasing = false;
|
||||
|
||||
CryptoPaymentData? get cryptoPaymentData {
|
||||
if (order == null) return null;
|
||||
|
||||
@@ -86,9 +93,13 @@ abstract class CakePayPurchaseViewModelBase with Store {
|
||||
}
|
||||
try {
|
||||
order = await cakePayService.createOrder(
|
||||
cardId: card.id,
|
||||
price: paymentCredential.amount.toString(),
|
||||
quantity: paymentCredential.quantity);
|
||||
cardId: card.id,
|
||||
price: paymentCredential.amount.toString(),
|
||||
quantity: paymentCredential.quantity,
|
||||
confirmsNoVpn: confirmsNoVpn,
|
||||
confirmsVoidedRefund: confirmsVoidedRefund,
|
||||
confirmsTermsAgreed: confirmsTermsAgreed,
|
||||
);
|
||||
await confirmSending();
|
||||
expirationTime = order!.paymentData.expirationTime;
|
||||
updateRemainingTime();
|
||||
|
||||
Reference in New Issue
Block a user