Skip to content

Commit

Permalink
Only implement receiver option for PrepareSendRequest amount
Browse files Browse the repository at this point in the history
  • Loading branch information
dangeross committed Nov 10, 2024
1 parent 9f86ae7 commit bd1bacb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/cubit/payments/payments_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,12 @@ class PaymentsCubit extends Cubit<PaymentsState> with HydratedMixin {

Future<PrepareSendResponse> 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) {
Expand Down

0 comments on commit bd1bacb

Please sign in to comment.