From a0815ba0be618857e35c92e218cbf12be4daab9b Mon Sep 17 00:00:00 2001 From: Rafael Taranto Date: Mon, 22 Jan 2024 15:00:51 +0000 Subject: [PATCH] fix: update all usages of getGaloyWallet --- lib/plugins/wallet/galoy/galoy.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/plugins/wallet/galoy/galoy.js b/lib/plugins/wallet/galoy/galoy.js index eb62f9ad..b74540e4 100644 --- a/lib/plugins/wallet/galoy/galoy.js +++ b/lib/plugins/wallet/galoy/galoy.js @@ -231,7 +231,7 @@ function newInvoice (walletId, cryptoAtoms, token, endpoint) { function balance (account, cryptoCode, settings, operatorId) { return checkCryptoCode(cryptoCode) - .then(() => getGaloyWallet(account.apiSecret, account.endpoint)) + .then(() => getGaloyWallet(account.apiSecret, account.endpoint, account.walletId)) .then(wallet => { return new BN(wallet.balance || 0) }) @@ -240,7 +240,7 @@ function balance (account, cryptoCode, settings, operatorId) { function newAddress (account, info, tx, settings, operatorId) { const { cryptoAtoms, cryptoCode } = tx return checkCryptoCode(cryptoCode) - .then(() => getGaloyWallet(account.apiSecret, account.endpoint)) + .then(() => getGaloyWallet(account.apiSecret, account.endpoint, account.walletId)) .then(wallet => { const promises = [ newOnChainAddress(wallet.id, account.apiSecret, account.endpoint), @@ -285,7 +285,7 @@ function newFunding (account, cryptoCode, settings, operatorId) { const externalCryptoCode = coinUtils.getEquivalentCode(cryptoCode) // Regular BTC address return checkCryptoCode(cryptoCode) - .then(() => getGaloyWallet(account.apiSecret, account.endpoint)) + .then(() => getGaloyWallet(account.apiSecret, account.endpoint, account.walletId)) .then(wallet => { return newOnChainAddress(wallet.id, account.apiSecret, account.endpoint) .then(onChainAddress => [onChainAddress, wallet.balance])