fix: use simplified LN deposit URL

This commit is contained in:
Rafael Taranto 2024-02-22 10:50:48 +00:00
parent 5fb9f33b2b
commit 459f7148f8

View file

@ -240,16 +240,7 @@ function newAddress (account, info, tx, settings, operatorId) {
const { cryptoAtoms, cryptoCode } = tx
return checkCryptoCode(cryptoCode)
.then(() => getGaloyWallet(account.apiSecret, account.endpoint, account.walletId))
.then(wallet => {
const promises = [
newOnChainAddress(wallet.id, account.apiSecret, account.endpoint),
newInvoice(wallet.id, cryptoAtoms, account.apiSecret, account.endpoint)
]
return Promise.all(promises)
})
.then(([onChainAddress, invoice]) => {
return `bitcoin:${onChainAddress}?amount=${cryptoAtoms}&lightning=${invoice}`
})
.then(wallet => newInvoice(wallet.id, cryptoAtoms, account.apiSecret, account.endpoint))
}
function getInvoiceStatus (token, endpoint, address) {