commit 1c3bf5ac1bb0221d33ae41428cbc88a9664c7adb
parent b58dc3d60f5f19cbcd487847dedc4c720fea7e3e
Author: Florian Dold <florian@dold.me>
Date: Wed, 23 Apr 2025 11:15:20 +0200
wallet-core: adapt to breaking withdrawal protocol change
Diffstat:
2 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts b/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
@@ -2212,12 +2212,17 @@ export const nativeCryptoR: TalerCryptoInterfaceR = {
const hPlanchets = hc.finish();
+ // Clause Schnorr blinding seed
+ // Wallet doesn't fully support CS yet.
+ const blindingSeed = new Uint8Array(32);
+
const withdrawRequest = buildSigPS(
TalerSignaturePurpose.WALLET_RESERVE_WITHDRAW,
)
.put(bufferFromAmount(req.amount))
.put(bufferFromAmount(req.fee))
.put(hPlanchets)
+ .put(blindingSeed)
.put(bufferForUint32(0)) // max_age_group
.put(bufferForUint32(0)) // age mask
.build();
diff --git a/packages/taler-wallet-core/src/withdraw.ts b/packages/taler-wallet-core/src/withdraw.ts
@@ -1756,10 +1756,6 @@ async function processPlanchetExchangeBatchRequest(
const reqUrl = new URL(`withdraw`, withdrawalGroup.exchangeBaseUrl).href;
- // if (logger.shouldLogTrace()) {
- // logger.trace(`batch-withdraw request: ${j2s(batchReq)}`);
- // }
-
const sigResp = await wex.cryptoApi.signWithdrawal({
amount: Amounts.stringify(accAmount),
fee: Amounts.stringify(accFee),
@@ -2630,12 +2626,7 @@ async function processWithdrawalGroupPendingReady(
let resp: WithdrawalBatchResult;
if (exchangeVer.current >= 26) {
logger.warn("new exchange version, but still using old batch request");
- // resp = await processPlanchetExchangeBatchRequest(wex, wgContext, {
- // batchSize: maxBatchSize,
- // coinStartIndex: i,
- // });
- // FIXME: Use new batch request here!
- resp = await processPlanchetExchangeLegacyBatchRequest(wex, wgContext, {
+ resp = await processPlanchetExchangeBatchRequest(wex, wgContext, {
batchSize: maxBatchSize,
coinStartIndex: i,
});