mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2025-12-22 16:34:23 +01:00
Update boltz-rust and add receive payment description (#409)
* Update boltz-rust * Store description and add to Payment struct * Fix examples
This commit is contained in:
@@ -134,16 +134,17 @@ class _ReceivePaymentDialogState extends State<ReceivePaymentDialog> {
|
||||
try {
|
||||
setState(() => creatingInvoice = true);
|
||||
int amountSat = int.parse(payerAmountController.text);
|
||||
PrepareReceiveRequest prepareReceiveReq =
|
||||
PrepareReceiveRequest(payerAmountSat: BigInt.from(amountSat));
|
||||
PrepareReceiveResponse req = await widget.liquidSDK.prepareReceivePayment(
|
||||
PrepareReceivePaymentRequest prepareReceiveReq =
|
||||
PrepareReceivePaymentRequest(payerAmountSat: BigInt.from(amountSat));
|
||||
PrepareReceivePaymentResponse prepareRes = await widget.liquidSDK.prepareReceivePayment(
|
||||
req: prepareReceiveReq,
|
||||
);
|
||||
setState(() {
|
||||
payerAmountSat = req.payerAmountSat.toInt();
|
||||
feesSat = req.feesSat.toInt();
|
||||
payerAmountSat = prepareRes.payerAmountSat.toInt();
|
||||
feesSat = prepareRes.feesSat.toInt();
|
||||
});
|
||||
ReceivePaymentResponse resp = await widget.liquidSDK.receivePayment(req: req);
|
||||
ReceivePaymentRequest receiveReq = ReceivePaymentRequest(prepareRes: prepareRes);
|
||||
ReceivePaymentResponse resp = await widget.liquidSDK.receivePayment(req: receiveReq);
|
||||
debugPrint(
|
||||
"Created Invoice for $payerAmountSat sats with $feesSat sats fees.\nInvoice:${resp.invoice}",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user