From 35ae9f2c22adcabd28747a1f2c4f21f51c732f42 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 28 Jun 2023 10:49:31 +0200 Subject: wallet-core: emit balance-change notifications, do less implicit background work --- packages/taler-wallet-core/src/operations/tip.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'packages/taler-wallet-core/src/operations/tip.ts') diff --git a/packages/taler-wallet-core/src/operations/tip.ts b/packages/taler-wallet-core/src/operations/tip.ts index 1b40e36f1..18ef03c51 100644 --- a/packages/taler-wallet-core/src/operations/tip.ts +++ b/packages/taler-wallet-core/src/operations/tip.ts @@ -30,6 +30,7 @@ import { getRandomBytes, j2s, Logger, + NotificationType, parseTipUri, PrepareTipResult, TalerErrorCode, @@ -57,7 +58,13 @@ import { readSuccessResponseJsonOrThrow, } from "@gnu-taler/taler-util/http"; import { checkDbInvariant, checkLogicInvariant } from "../util/invariants.js"; -import { constructTaskIdentifier, makeCoinAvailable, makeCoinsVisible, OperationAttemptResult, OperationAttemptResultType } from "./common.js"; +import { + constructTaskIdentifier, + makeCoinAvailable, + makeCoinsVisible, + OperationAttemptResult, + OperationAttemptResultType, +} from "./common.js"; import { updateExchangeFromUrl } from "./exchanges.js"; import { getCandidateWithdrawalDenoms, @@ -421,6 +428,7 @@ export async function processTip( return { oldTxState, newTxState }; }); notifyTransition(ws, transactionId, transitionInfo); + ws.notify({ type: NotificationType.BalanceChange }); return { type: OperationAttemptResultType.Finished, -- cgit v1.2.3