From 1b0b40fee2b15dd8847bf91c01630492ced93750 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sun, 4 Feb 2024 17:01:46 -0300 Subject: backward compatible change to acceptReward with txId --- packages/taler-wallet-core/src/wallet.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'packages/taler-wallet-core/src/wallet.ts') diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index 005fac3c4..6440a9912 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -251,6 +251,7 @@ import { } from "./operations/refresh.js"; import { acceptTip, + acceptTipBackwardCompat, computeRewardTransactionStatus, prepareReward, processTip, @@ -734,9 +735,9 @@ async function dumpCoins(ws: InternalWalletState): Promise { ageCommitmentProof: c.ageCommitmentProof, spend_allocation: c.spendAllocation ? { - amount: c.spendAllocation.amount, - id: c.spendAllocation.id, - } + amount: c.spendAllocation.amount, + id: c.spendAllocation.id, + } : undefined, }); } @@ -1194,7 +1195,7 @@ async function dispatchRequestInternal( } case WalletApiOperation.AcceptReward: { const req = codecForAcceptTipRequest().decode(payload); - return await acceptTip(ws, req.walletRewardId); + return await acceptTipBackwardCompat(ws, req.walletRewardId, req.transactionId); } case WalletApiOperation.AddBackupProvider: { const req = codecForAddBackupProviderRequest().decode(payload); -- cgit v1.2.3