diff options
author | Florian Dold <florian@dold.me> | 2024-02-19 12:49:17 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-02-19 17:47:35 +0100 |
commit | 1ec521b9d214b286e747b3ccb3113730ac3a2509 (patch) | |
tree | 2f3d2b2906810dca45859b8cbfb8d18d53b27e80 /packages/taler-wallet-core/src/operations/testing.ts | |
parent | 1034ecb5f20bd8c75e37e0b4b454ea6c1f4c1da6 (diff) | |
download | wallet-core-1ec521b9d214b286e747b3ccb3113730ac3a2509.tar.xz |
wallet-core: simplify/unify DB access
Diffstat (limited to 'packages/taler-wallet-core/src/operations/testing.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/testing.ts | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/packages/taler-wallet-core/src/operations/testing.ts b/packages/taler-wallet-core/src/operations/testing.ts index 17863450c..3c7845813 100644 --- a/packages/taler-wallet-core/src/operations/testing.ts +++ b/packages/taler-wallet-core/src/operations/testing.ts @@ -903,11 +903,9 @@ export async function testPay( if (r.type != ConfirmPayResultType.Done) { throw Error("payment not done"); } - const purchase = await ws.db - .mktx((x) => [x.purchases]) - .runReadOnly(async (tx) => { - return tx.purchases.get(result.proposalId); - }); + const purchase = await ws.db.runReadOnlyTx(["purchases"], async (tx) => { + return tx.purchases.get(result.proposalId); + }); checkLogicInvariant(!!purchase); return { payCoinSelection: purchase.payInfo?.payCoinSelection!, |