Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/action/invoice.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<undefined>}
Expand All @@ -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}`;
Expand Down
1 change: 1 addition & 0 deletions test/unit/action/invoice.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ describe('Action Invoice Unit Tests', () => {
.withArgs('addInvoice', {
value: 1000,
memo: 'foo',
private: true,
})
.resolves({
payment_request: 'some-request',
Expand Down