From f5ef863a77fa6366848b6c50126e49988ece99c1 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 17 May 2024 15:46:04 -0300 Subject: fix forced-selection integration-test --- packages/taler-wallet-core/src/withdraw.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/taler-wallet-core/src/withdraw.ts b/packages/taler-wallet-core/src/withdraw.ts index d55eebf45..bc19dc1f6 100644 --- a/packages/taler-wallet-core/src/withdraw.ts +++ b/packages/taler-wallet-core/src/withdraw.ts @@ -1454,8 +1454,7 @@ export async function updateWithdrawalDenoms( denom.verificationStatus === DenominationVerificationStatus.Unverified ) { logger.trace( - `Validating denomination (${current + 1}/${ - denominations.length + `Validating denomination (${current + 1}/${denominations.length }) signature of ${denom.denomPubHash}`, ); let valid = false; @@ -1573,10 +1572,12 @@ async function processQueryReserve( Amounts.cmp( result.response.balance, withdrawalGroup.denomsSel.totalWithdrawCost, - ) != 0 + ) === -1 ) { amountChanged = true; } + console.log(`amount change ${j2s(result.response)}`) + console.log(`amount change ${j2s(withdrawalGroup.denomsSel.totalWithdrawCost)}`) const exchangeBaseUrl = withdrawalGroup.exchangeBaseUrl; const currency = Amounts.currencyOf(withdrawalGroup.instructedAmount); @@ -2214,7 +2215,7 @@ export async function getExchangeWithdrawalInfo( ) { logger.warn( `wallet's support for exchange protocol version ${WALLET_EXCHANGE_PROTOCOL_VERSION} might be outdated ` + - `(exchange has ${exchange.protocolVersionRange}), checking for updates`, + `(exchange has ${exchange.protocolVersionRange}), checking for updates`, ); } } @@ -2728,9 +2729,9 @@ export async function internalPrepareCreateWithdrawalGroup( const creationInfo = exchangeBaseUrl !== undefined && amount !== undefined ? { - canonExchange: exchangeBaseUrl, - amount, - } + canonExchange: exchangeBaseUrl, + amount, + } : undefined; if (creationInfo) { @@ -3032,7 +3033,7 @@ export async function confirmWithdrawal( Amounts.parseOrThrow(req.amount), req.forcedDenomSel, ); - + ctx.transition({}, async (rec) => { if (!rec) { return TransitionResult.stay(); -- cgit v1.2.3