aboutsummaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/taler-wallet-core/src/dev-experiments.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/dev-experiments.ts b/packages/taler-wallet-core/src/dev-experiments.ts
index 7cf18e36c..db2ff5d06 100644
--- a/packages/taler-wallet-core/src/dev-experiments.ts
+++ b/packages/taler-wallet-core/src/dev-experiments.ts
@@ -39,6 +39,7 @@ import {
HttpRequestOptions,
HttpResponse,
} from "@gnu-taler/taler-util/http";
+import { PendingTaskType, constructTaskIdentifier } from "./common.js";
import {
DenomLossEventRecord,
DenomLossStatus,
@@ -77,8 +78,8 @@ export async function applyDevExperiment(
return;
}
case "insert-pending-refresh": {
+ const refreshGroupId = encodeCrock(getRandomBytes(32));
await wex.db.runReadWriteTx(["refreshGroups"], async (tx) => {
- const refreshGroupId = encodeCrock(getRandomBytes(32));
const newRg: RefreshGroupRecord = {
currency: "TESTKUDOS",
expectedOutputPerCoin: [],
@@ -95,6 +96,12 @@ export async function applyDevExperiment(
};
await tx.refreshGroups.put(newRg);
});
+ wex.taskScheduler.startShepherdTask(
+ constructTaskIdentifier({
+ tag: PendingTaskType.Refresh,
+ refreshGroupId,
+ }),
+ );
return;
}
case "insert-denom-loss": {