fix: update all usages of getGaloyWallet
This commit is contained in:
parent
831351bb0d
commit
a0815ba0be
1 changed files with 3 additions and 3 deletions
|
|
@ -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])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue