diff options
author | Florian Dold <florian@dold.me> | 2024-01-08 21:17:00 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-01-08 21:17:08 +0100 |
commit | 6f2b03021d7946a61d6b8e53dbba7fc10e5f9a4d (patch) | |
tree | 82a3985ab7267e6f4a57c0b275f1929558b5e572 /packages/taler-wallet-core/src/operations/deposits.ts | |
parent | c019f4c040e82baebdbbda8208f10be2fbc19566 (diff) | |
download | wallet-core-6f2b03021d7946a61d6b8e53dbba7fc10e5f9a4d.tar.xz |
wallet-core: exchange management cleanup
Diffstat (limited to 'packages/taler-wallet-core/src/operations/deposits.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/deposits.ts | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/packages/taler-wallet-core/src/operations/deposits.ts b/packages/taler-wallet-core/src/operations/deposits.ts index 8205b7583..f158d9cf9 100644 --- a/packages/taler-wallet-core/src/operations/deposits.ts +++ b/packages/taler-wallet-core/src/operations/deposits.ts @@ -75,7 +75,6 @@ import { getCandidateWithdrawalDenomsTx, getTotalRefreshCost, timestampPreciseToDb, - timestampProtocolFromDb, timestampProtocolToDb, } from "../index.js"; import { InternalWalletState } from "../internal-wallet-state.js"; @@ -89,7 +88,7 @@ import { runLongpollAsync, spendCoins, } from "./common.js"; -import { getExchangeDetails } from "./exchanges.js"; +import { getExchangeWireDetailsInTx } from "./exchanges.js"; import { extractContractData, generateDepositPermissions, @@ -1168,7 +1167,7 @@ export async function prepareDepositGroup( .runReadOnly(async (tx) => { const allExchanges = await tx.exchanges.iter().toArray(); for (const e of allExchanges) { - const details = await getExchangeDetails(tx, e.baseUrl); + const details = await getExchangeWireDetailsInTx(tx, e.baseUrl); if (!details || amount.currency !== details.currency) { continue; } @@ -1282,7 +1281,7 @@ export async function createDepositGroup( .runReadOnly(async (tx) => { const allExchanges = await tx.exchanges.iter().toArray(); for (const e of allExchanges) { - const details = await getExchangeDetails(tx, e.baseUrl); + const details = await getExchangeWireDetailsInTx(tx, e.baseUrl); if (!details || amount.currency !== details.currency) { continue; } @@ -1495,7 +1494,10 @@ export async function getCounterpartyEffectiveDepositAmount( } for (const exchangeUrl of exchangeSet.values()) { - const exchangeDetails = await getExchangeDetails(tx, exchangeUrl); + const exchangeDetails = await getExchangeWireDetailsInTx( + tx, + exchangeUrl, + ); if (!exchangeDetails) { continue; } @@ -1574,7 +1576,10 @@ async function getTotalFeesForDepositAmount( } for (const exchangeUrl of exchangeSet.values()) { - const exchangeDetails = await getExchangeDetails(tx, exchangeUrl); + const exchangeDetails = await getExchangeWireDetailsInTx( + tx, + exchangeUrl, + ); if (!exchangeDetails) { continue; } |