Consolidate "receive payment" snippets, expose invoice

This commit is contained in:
ok300
2024-01-12 10:17:29 +01:00
parent 464a29816d
commit fd10bbc286
8 changed files with 28 additions and 15 deletions

View File

@@ -2,9 +2,11 @@ import { receivePayment } from '@breeztech/react-native-breez-sdk'
const exampleReceiveLightningPayment = async () => {
// ANCHOR: receive-payment
const invoice = await receivePayment({
amountMsat: 3000000,
const receivePaymentResponse = await receivePayment({
amountMsat: 3_000_000,
description: 'Invoice for 3000 sats'
})
const invoice = receivePaymentResponse.lnInvoice
// ANCHOR_END: receive-payment
}