taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 84314c88079fc7d6005ec6153b60c8f3be4a4120
parent cca3196ed9c61d3e3d92dcd18bea7a97d4526948
Author: Florian Dold <florian@dold.me>
Date:   Tue,  3 Jun 2025 21:20:20 +0200

wallet-core: fix missing notification

When transitioning to the kyc-auth state in a deposit transaction, we
previously did not emit a balance change notification, because the
balance doesn't change.  However, the balance *flags* change, so we
still need to emit a notification.

Diffstat:
Mpackages/taler-wallet-core/src/deposits.ts | 2+-
Mpackages/taler-wallet-core/src/transactions.ts | 7++++++-
2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/packages/taler-wallet-core/src/deposits.ts b/packages/taler-wallet-core/src/deposits.ts @@ -1379,7 +1379,7 @@ async function transitionToKycAuthRequired( await tx.depositGroups.put(dg); await ctx.updateTransactionMeta(tx); const newTxState = computeDepositTransactionStatus(dg); - return { oldTxState, newTxState, balanceEffect: BalanceEffect.None }; + return { oldTxState, newTxState, balanceEffect: BalanceEffect.Flags }; }, ); notifyTransition(wex, ctx.transactionId, transitionInfo); diff --git a/packages/taler-wallet-core/src/transactions.ts b/packages/taler-wallet-core/src/transactions.ts @@ -931,9 +931,14 @@ export enum BalanceEffect { */ PreserveUserVisible = 1, /** + * The balance preserves the user-visible balance, + * but might affect user-visible flags. + */ + Flags = 2, + /** * Balance change can have any effect. */ - Any = 2, + Any = 3, } /**