summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-03-06 10:23:39 +0100
committerFlorian Dold <florian@dold.me>2024-03-06 10:23:39 +0100
commit794a9dc01185ffa5f6d3cf22d1041b4e8f468f48 (patch)
tree0aee84bf4a03bac888a867479ec496b6dcadcf9c /packages/taler-wallet-core
parent5c18e924ed8bc5ccc37d226cfdc04e26c76e020b (diff)
downloadwallet-core-794a9dc01185ffa5f6d3cf22d1041b4e8f468f48.tar.gz
wallet-core-794a9dc01185ffa5f6d3cf22d1041b4e8f468f48.tar.bz2
wallet-core-794a9dc01185ffa5f6d3cf22d1041b4e8f468f48.zip
-remove deprecated type
Diffstat (limited to 'packages/taler-wallet-core')
-rw-r--r--packages/taler-wallet-core/src/refresh.ts16
1 files changed, 11 insertions, 5 deletions
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<ForceRefreshResult> {
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,
};
}