From 794a9dc01185ffa5f6d3cf22d1041b4e8f468f48 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 6 Mar 2024 10:23:39 +0100 Subject: -remove deprecated type --- packages/taler-wallet-core/src/refresh.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'packages/taler-wallet-core') diff --git a/packages/taler-wallet-core/src/refresh.ts b/packages/taler-wallet-core/src/refresh.ts index f67fb5015..c6ece1536 100644 --- a/packages/taler-wallet-core/src/refresh.ts +++ b/packages/taler-wallet-core/src/refresh.ts @@ -44,7 +44,6 @@ import { Logger, makeErrorDetail, NotificationType, - RefreshGroupId, RefreshReason, TalerError, TalerErrorCode, @@ -101,7 +100,6 @@ import { import { EXCHANGE_COINS_LOCK, getDenomInfo, - InternalWalletState, WalletExecutionContext, } from "./wallet.js"; import { getCandidateWithdrawalDenomsTx } from "./withdraw.js"; @@ -1412,14 +1410,18 @@ export function getRefreshesForTransaction( }); } +export interface ForceRefreshResult { + refreshGroupId: string; +} + export async function forceRefresh( wex: WalletExecutionContext, req: ForceRefreshRequest, -): Promise<{ refreshGroupId: RefreshGroupId }> { +): Promise { if (req.coinPubList.length == 0) { throw Error("refusing to create empty refresh group"); } - const refreshGroupId = await wex.db.runReadWriteTx( + const res = await wex.db.runReadWriteTx( ["refreshGroups", "coinAvailability", "denominations", "coins"], async (tx) => { let coinPubs: CoinRefreshRequest[] = []; @@ -1451,7 +1453,11 @@ export async function forceRefresh( }, ); + for (const notif of res.notifications) { + wex.ws.notify(notif); + } + return { - refreshGroupId, + refreshGroupId: res.refreshGroupId, }; } -- cgit v1.2.3