diff options
author | Florian Dold <florian@dold.me> | 2024-02-27 15:31:01 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-02-27 15:31:01 +0100 |
commit | f78d7dc613946b0316a559aa0161dd02b056b05d (patch) | |
tree | bcf37180afbd02d71e4faac896edcd0b18e2f4bb /packages/taler-wallet-core/src/withdraw.ts | |
parent | 41f34031ae934e8c802cdbb73fffb5a39c9c6a68 (diff) | |
download | wallet-core-f78d7dc613946b0316a559aa0161dd02b056b05d.tar.xz |
-move function
Diffstat (limited to 'packages/taler-wallet-core/src/withdraw.ts')
-rw-r--r-- | packages/taler-wallet-core/src/withdraw.ts | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/packages/taler-wallet-core/src/withdraw.ts b/packages/taler-wallet-core/src/withdraw.ts index a54295613..25c1e5129 100644 --- a/packages/taler-wallet-core/src/withdraw.ts +++ b/packages/taler-wallet-core/src/withdraw.ts @@ -146,7 +146,7 @@ import { WALLET_BANK_INTEGRATION_PROTOCOL_VERSION, WALLET_EXCHANGE_PROTOCOL_VERSION, } from "./versions.js"; -import type { InternalWalletState } from "./wallet.js"; +import { getDenomInfo, type InternalWalletState } from "./wallet.js"; /** * Logger for this file. @@ -678,12 +678,7 @@ async function processPlanchetGenerate( const denomPubHash = maybeDenomPubHash; const denom = await ws.db.runReadOnlyTx(["denominations"], async (tx) => { - return ws.getDenomInfo( - ws, - tx, - withdrawalGroup.exchangeBaseUrl, - denomPubHash, - ); + return getDenomInfo(ws, tx, withdrawalGroup.exchangeBaseUrl, denomPubHash); }); checkDbInvariant(!!denom); const r = await ws.cryptoApi.createPlanchet({ @@ -943,7 +938,7 @@ async function processPlanchetExchangeBatchRequest( logger.warn("processPlanchet: planchet already withdrawn"); continue; } - const denom = await ws.getDenomInfo( + const denom = await getDenomInfo( ws, tx, withdrawalGroup.exchangeBaseUrl, @@ -1057,7 +1052,7 @@ async function processPlanchetVerifyAndStoreCoin( logger.warn("processPlanchet: planchet already withdrawn"); return; } - const denomInfo = await ws.getDenomInfo( + const denomInfo = await getDenomInfo( ws, tx, withdrawalGroup.exchangeBaseUrl, @@ -1814,7 +1809,7 @@ export async function getExchangeWithdrawalInfo( await ws.db.runReadOnlyTx(["denominations"], async (tx) => { for (let i = 0; i < selectedDenoms.selectedDenoms.length; i++) { const ds = selectedDenoms.selectedDenoms[i]; - const denom = await ws.getDenomInfo( + const denom = await getDenomInfo( ws, tx, exchangeBaseUrl, |