taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 0aeb79b84d9347ba9642d0e2dccf1b20927b45e0
parent f3f35390cf2ef78eef9f4aff9dd337c33eeb3931
Author: Florian Dold <florian@dold.me>
Date:   Mon,  8 Apr 2024 14:38:26 +0200

wallet-core: also shepherd fake refresh transaction

Otherwise it won't show up as failing when refreshes are blocked
via a different dev experiment.

Diffstat:
Mpackages/taler-wallet-core/src/dev-experiments.ts | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git 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": {