From 9f187308d4a68c0fef36d881eefd096228154b74 Mon Sep 17 00:00:00 2001 From: Godwin Asuquo <41484542+godilite@users.noreply.github.com> Date: Mon, 24 Oct 2022 22:27:10 +0300 Subject: [PATCH] Fix gift card purchase (#553) * Fix gift card purchase * cast as optional bool --- lib/anypay/any_pay_payment_instruction.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/anypay/any_pay_payment_instruction.dart b/lib/anypay/any_pay_payment_instruction.dart index 6477e6649..5181cad75 100644 --- a/lib/anypay/any_pay_payment_instruction.dart +++ b/lib/anypay/any_pay_payment_instruction.dart @@ -17,8 +17,8 @@ class AnyPayPaymentInstruction { return AnyPayPaymentInstruction( type: obj['type'] as String, requiredFeeRate: obj['requiredFeeRate'] as int, - txKey: obj['tx_key'] as bool, - txHash: obj['tx_hash'] as bool, + txKey: obj['tx_key'] as bool? ?? false, + txHash: obj['tx_hash'] as bool? ?? false, outputs: outputs); }