diff options
author | Florian Dold <florian@dold.me> | 2023-12-11 20:01:28 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-12-12 15:42:34 +0100 |
commit | e31f18b8f129adb9cbe33158297a9cff56a7143e (patch) | |
tree | fc960e069a08ca1924a79c154f5ced26db709348 /packages/taler-wallet-core/src/operations/withdraw.ts | |
parent | 055645e17aa9424f299aa04f686de7574ab437c7 (diff) | |
download | wallet-core-e31f18b8f129adb9cbe33158297a9cff56a7143e.tar.xz |
wallet-core: towards better DD48 support
Diffstat (limited to 'packages/taler-wallet-core/src/operations/withdraw.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/withdraw.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts b/packages/taler-wallet-core/src/operations/withdraw.ts index b9ba3058f..e7ba6d820 100644 --- a/packages/taler-wallet-core/src/operations/withdraw.ts +++ b/packages/taler-wallet-core/src/operations/withdraw.ts @@ -135,7 +135,7 @@ import { import { getExchangeDetails, getExchangePaytoUri, - updateExchangeFromUrl, + fetchFreshExchange, } from "./exchanges.js"; import { TransitionInfo, @@ -1862,8 +1862,8 @@ export async function getExchangeWithdrawalInfo( } let tosAccepted = false; - if (exchangeDetails.tosAccepted?.timestamp) { - if (exchangeDetails.tosAccepted.etag === exchangeDetails.tosCurrentEtag) { + if (exchange.tosAcceptedTimestamp) { + if (exchange.tosAcceptedEtag === exchange.tosCurrentEtag) { tosAccepted = true; } } @@ -2372,7 +2372,7 @@ export async function internalPrepareCreateWithdrawalGroup( wgInfo: args.wgInfo, }; - const exchangeInfo = await updateExchangeFromUrl(ws, canonExchange); + const exchangeInfo = await fetchFreshExchange(ws, canonExchange); const exchangeDetails = exchangeInfo.exchangeDetails; const transactionId = constructTransactionIdentifier({ tag: TransactionType.Withdrawal, @@ -2515,7 +2515,7 @@ export async function acceptWithdrawalFromUri( }; } - await updateExchangeFromUrl(ws, selectedExchange); + await fetchFreshExchange(ws, selectedExchange); const withdrawInfo = await getBankWithdrawalInfo( ws.http, req.talerWithdrawUri, |