@@ -3,7 +3,11 @@ import { MIN_USD_BTC_LIGHTNING_SWAP, SATSPERBITCOIN } from "../../constants";
33import { getBolt11InvoiceForContact } from "../contacts" ;
44import { isBlitzLNURLAddress } from "../lnurl" ;
55import normalizeLNURLAddress from "../lnurl/normalizeLNURLAddress" ;
6- import { dollarsToSats , getLightningPaymentQuote } from "../spark/flashnet" ;
6+ import {
7+ dollarsToSats ,
8+ getLightningPaymentQuote ,
9+ USD_ASSET_ADDRESS ,
10+ } from "../spark/flashnet" ;
711import { getLNAddressForLiquidPayment } from "./payments" ;
812import { sparkPaymenWrapper } from "../spark/payments" ;
913
@@ -27,8 +31,7 @@ export default async function processLNUrlPay(input, context) {
2731 poolInfoRef,
2832 } = context ;
2933
30- const [ username , domain ] = input . data . address ?. split ( "@" ) ;
31- console . log ( username , domain ) ;
34+ const [ username , domain ] = input ?. data ?. address ?. split ( "@" ) || [ ] ;
3235
3336 const nomralizedAddress = normalizeLNURLAddress ( input . data . address ) ;
3437 if (
@@ -192,7 +195,7 @@ export default async function processLNUrlPay(input, context) {
192195 getFee : true ,
193196 address : invoice ,
194197 amountSats : Number ( enteredPaymentInfo . amount ) ,
195- paymentType : ! ! decoded . data . usingSparkAddress ? "spark" : "lightning" ,
198+ paymentType : decoded . data . usingSparkAddress ? "spark" : "lightning" ,
196199 masterInfoObject,
197200 mnemonic : currentWalletMnemoinc ,
198201 } ) ,
0 commit comments