fix: ln merge issues and deprecate some libs

This commit is contained in:
Rafael Taranto 2023-10-05 22:55:02 +01:00
parent c9e3fcd9ca
commit 546ba7b780
11 changed files with 4384 additions and 4814 deletions

View file

@ -142,7 +142,7 @@ function sendFundsLN (walletId, invoice, token) {
function sendCoins (account, tx, settings, operatorId) {
const { toAddress, cryptoAtoms, cryptoCode } = tx
const externalCryptoCode = coinUtils.getExternalCryptoCode(cryptoCode)
const externalCryptoCode = coinUtils.getEquivalentCode(cryptoCode)
return checkCryptoCode(cryptoCode)
.then(() => getGaloyAccount(account.apiKey))
.then(galoyAccount => {
@ -215,7 +215,7 @@ function newInvoice (walletId, cryptoAtoms, token) {
}
function balance (account, cryptoCode, settings, operatorId) {
const externalCryptoCode = coinUtils.getExternalCryptoCode(cryptoCode)
const externalCryptoCode = coinUtils.getEquivalentCode(cryptoCode)
return checkCryptoCode(cryptoCode)
.then(() => getGaloyAccount(account.apiKey))
.then(galoyAccount => {
@ -232,7 +232,7 @@ function balance (account, cryptoCode, settings, operatorId) {
function newAddress (account, info, tx, settings, operatorId) {
const { cryptoAtoms, cryptoCode } = tx
const externalCryptoCode = coinUtils.getExternalCryptoCode(cryptoCode)
const externalCryptoCode = coinUtils.getEquivalentCode(cryptoCode)
return checkCryptoCode(cryptoCode)
.then(() => getGaloyAccount(account.apiKey))
.then(galoyAccount => {
@ -260,7 +260,7 @@ function getStatus (account, tx, requested, settings, operatorId) {
if (tx.node.status === TX_SUCCESS) return 'confirmed'
return 'notSeen'
}
const externalCryptoCode = coinUtils.getExternalCryptoCode(cryptoCode)
const externalCryptoCode = coinUtils.getEquivalentCode(cryptoCode)
const address = coinUtils.parseUrl(toAddress)
return checkCryptoCode(cryptoCode)
.then(() => getGaloyAccount(account.apiKey))
@ -283,7 +283,7 @@ function getStatus (account, tx, requested, settings, operatorId) {
}
function newFunding (account, cryptoCode, settings, operatorId) {
const externalCryptoCode = coinUtils.getExternalCryptoCode(cryptoCode)
const externalCryptoCode = coinUtils.getEquivalentCode(cryptoCode)
// Regular BTC address
return checkCryptoCode(cryptoCode)
.then(() => getGaloyAccount(account.apiKey))