diff --git a/pages/wallet.js b/pages/wallet.js index 6f9845fbeb..9530294f65 100644 --- a/pages/wallet.js +++ b/pages/wallet.js @@ -279,7 +279,11 @@ function InvoiceScanner ({ fieldName }) { return ( { - helpers.setValue(result.replace(/^lightning:/, '').toLowerCase()) + if (result.startsWith('bitcoin:')) { + helpers.setValue(result.split('lightning=')[1].split(/[&?]/)[0].toLowerCase()) + } else { + helpers.setValue(result.replace(/^lightning:/, '').toLowerCase()) + } onClose() }} onError={(error) => {