Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #3115 from mrfelton/fix/lndconnect-qrcode-warning
Browse files Browse the repository at this point in the history
Skip generation of lndconnect qrcode links for temporary wallets
  • Loading branch information
mrfelton authored Nov 7, 2019
2 parents 571cc35 + a57589d commit 080aad4
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion utils/lndConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,16 @@ class LndConfig {
return isReadyStore.get(this)
},
},
isTemporary: {
enumerable: true,
get() {
return this.id === TEMP_WALLET_ID
},
},
lndDir: {
enumerable: true,
get() {
if (this.id === TEMP_WALLET_ID) {
if (this.isTemporary) {
const cache = tmpDirStore.get(this)
if (cache) {
return cache
Expand Down Expand Up @@ -232,6 +238,12 @@ class LndConfig {
* @returns {string} Embedded lndconnect uri.
*/
async generateLndconnectQRCode() {
// Temporary wallets are only used for the purpose of generating a new seed and will not support QR code generation
// as they will never be running long enough to have a certificate or macaroon generated.
if (this.isTemporary) {
return null
}

const { decoder, lndconnectUri } = this
switch (decoder) {
case 'lnd.lndconnect.v1':
Expand Down

0 comments on commit 080aad4

Please sign in to comment.