aboutsummaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2024-05-17 15:46:04 -0300
committerSebastian <sebasjm@gmail.com>2024-05-17 15:46:04 -0300
commitf5ef863a77fa6366848b6c50126e49988ece99c1 (patch)
treef6f763645619b866f95f8141d697933948562acb /packages
parent7a72a2c04299697b1453219750ce810f1cadf50b (diff)
downloadwallet-core-f5ef863a77fa6366848b6c50126e49988ece99c1.tar.xz
fix forced-selection integration-test
Diffstat (limited to 'packages')
-rw-r--r--packages/taler-wallet-core/src/withdraw.ts17
1 files 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();