mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 05:44:20 +01:00
Consolidate "receive payment" snippets, expose invoice
This commit is contained in:
@@ -9,10 +9,12 @@ import BreezSDK
|
||||
|
||||
func receivePayment(sdk: BlockingBreezServices) -> ReceivePaymentResponse? {
|
||||
// ANCHOR: receive-payment
|
||||
let repsonse = try? sdk.receivePayment(
|
||||
let receivePaymentResponse = try? sdk.receivePayment(
|
||||
req: ReceivePaymentRequest(
|
||||
amountMsat: 3_000_000,
|
||||
description: "Invoice for 3 000 000 sats"))
|
||||
description: "Invoice for 3 000 sats"))
|
||||
|
||||
let invoice = receivePaymentResponse?.lnInvoice;
|
||||
// ANCHOR_END: receive-payment
|
||||
return repsonse
|
||||
return receivePaymentResponse
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user