diff --git a/src/action/invoice.js b/src/action/invoice.js index a6e908607..d7f31d2e7 100644 --- a/src/action/invoice.js +++ b/src/action/invoice.js @@ -52,6 +52,8 @@ class InvoiceAction { * which can be rendered in a QR code for scanning. After the values * are set on the store the user is navigated to the invoice QR view * which displays the QR for consumption by the payer. + * The invoice is set private since it should contain a routing hint + * for private channels. * This action can be called from a view event handler as does all * the necessary error handling and notification display. * @return {Promise} @@ -62,6 +64,7 @@ class InvoiceAction { const response = await this._grpc.sendCommand('addInvoice', { value: toSatoshis(invoice.amount, settings), memo: invoice.note, + private: true, }); invoice.encoded = response.payment_request; invoice.uri = `${PREFIX_URI}${invoice.encoded}`; diff --git a/test/unit/action/invoice.spec.js b/test/unit/action/invoice.spec.js index f19018cc9..64bfea1de 100644 --- a/test/unit/action/invoice.spec.js +++ b/test/unit/action/invoice.spec.js @@ -60,6 +60,7 @@ describe('Action Invoice Unit Tests', () => { .withArgs('addInvoice', { value: 1000, memo: 'foo', + private: true, }) .resolves({ payment_request: 'some-request',