Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit abcadcb

Browse files
authored
Merge pull request #676 from lightninglabs/routing-hint
Set invoice as not private to add routing hint
2 parents 2794795 + 0b8dda0 commit abcadcb

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/action/invoice.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ class InvoiceAction {
5252
* which can be rendered in a QR code for scanning. After the values
5353
* are set on the store the user is navigated to the invoice QR view
5454
* which displays the QR for consumption by the payer.
55+
* The invoice is set private since it should contain a routing hint
56+
* for private channels.
5557
* This action can be called from a view event handler as does all
5658
* the necessary error handling and notification display.
5759
* @return {Promise<undefined>}
@@ -62,6 +64,7 @@ class InvoiceAction {
6264
const response = await this._grpc.sendCommand('addInvoice', {
6365
value: toSatoshis(invoice.amount, settings),
6466
memo: invoice.note,
67+
private: true,
6568
});
6669
invoice.encoded = response.payment_request;
6770
invoice.uri = `${PREFIX_URI}${invoice.encoded}`;

test/unit/action/invoice.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ describe('Action Invoice Unit Tests', () => {
6060
.withArgs('addInvoice', {
6161
value: 1000,
6262
memo: 'foo',
63+
private: true,
6364
})
6465
.resolves({
6566
payment_request: 'some-request',

0 commit comments

Comments
 (0)