tolerate nullable payment methods

This commit is contained in:
OmarHatem
2025-11-02 05:54:27 +01:00
parent 44a4a01b91
commit dd772d84f9
3 changed files with 14 additions and 15 deletions
@@ -1,6 +1,5 @@
import 'dart:async';
import 'package:cake_wallet/buy/buy_provider_description.dart';
import 'package:cake_wallet/order/order_provider_description.dart';
import 'package:cake_wallet/order/order.dart';
import 'package:cake_wallet/order/order_source_description.dart';
@@ -170,10 +169,10 @@ abstract class CakePayBuyCardViewModelBase with Store {
from: CakePayOrder.getCurrencyCodeFromPaymentMethod(selectedPaymentMethod!),
to: order!.fiatCurrencyCode,
createdAt: DateTime.now(),
amount: paymentData.amount ?? '',
amount: paymentData.amount,
receiveAmount: order!.totalReceiveAmount,
quantity: order!.quantity.toString(),
receiveAddress: paymentData.address ?? '',
receiveAddress: paymentData.address,
source: OrderSourceDescription.order,
giftCardProvider: OrderProviderDescription.cakePay,
walletId: sendViewModel.wallet.id);