From bd1bacb94b85e3c00dfba87f02176bd1ca4463cc Mon Sep 17 00:00:00 2001 From: Ross Savage Date: Sun, 10 Nov 2024 13:23:37 +0100 Subject: [PATCH] Only implement receiver option for PrepareSendRequest amount --- lib/cubit/payments/payments_cubit.dart | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/cubit/payments/payments_cubit.dart b/lib/cubit/payments/payments_cubit.dart index 0f7c86e9..d2831ae3 100644 --- a/lib/cubit/payments/payments_cubit.dart +++ b/lib/cubit/payments/payments_cubit.dart @@ -53,16 +53,12 @@ class PaymentsCubit extends Cubit with HydratedMixin { Future prepareSendPayment({ required String destination, - bool isDrain = false, BigInt? amountSat, }) async { _log.info("prepareSendPayment\nPreparing send payment for destination: $destination"); try { - final payOnchainAmount = isDrain - ? const PayOnchainAmount_Drain() - : amountSat != null - ? PayOnchainAmount_Receiver(amountSat: amountSat) - : null; + // TODO: Handle the drain option for PrepareSendRequest + final payOnchainAmount = amountSat != null ? PayOnchainAmount_Receiver(amountSat: amountSat) : null; final req = PrepareSendRequest(destination: destination, amount: payOnchainAmount); return await _liquidSdk.instance!.prepareSendPayment(req: req); } catch (e) {