diff options
author | Florian Dold <florian@dold.me> | 2024-04-08 14:38:26 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-04-08 14:38:41 +0200 |
commit | 0aeb79b84d9347ba9642d0e2dccf1b20927b45e0 (patch) | |
tree | 147b045de0779a31abb3a203e9b5a868171c83fb | |
parent | f3f35390cf2ef78eef9f4aff9dd337c33eeb3931 (diff) | |
download | wallet-core-0aeb79b84d9347ba9642d0e2dccf1b20927b45e0.tar.xz |
wallet-core: also shepherd fake refresh transaction
Otherwise it won't show up as failing when refreshes are blocked
via a different dev experiment.
-rw-r--r-- | packages/taler-wallet-core/src/dev-experiments.ts | 9 |
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": { |