From 2d4a53f5221274982954a6377e948f3aa441c083 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 9 Jun 2021 16:20:50 +0200 Subject: [PATCH] return transaction context --- packages/taler-wallet-core/src/db.ts | 4 ---- packages/taler-wallet-core/src/util/query.ts | 17 +---------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts index 32109581c..14f61c8db 100644 --- a/packages/taler-wallet-core/src/db.ts +++ b/packages/taler-wallet-core/src/db.ts @@ -1510,10 +1510,6 @@ export interface RecoupGroupRecord { lastError: TalerErrorDetails | undefined; } -export enum ImportPayloadType { - CoreSchema = "core-schema", -} - export enum BackupProviderStatus { PaymentRequired = "payment-required", Ready = "ready", diff --git a/packages/taler-wallet-core/src/util/query.ts b/packages/taler-wallet-core/src/util/query.ts index 2cb0c7fea..ab5a1fc7a 100644 --- a/packages/taler-wallet-core/src/util/query.ts +++ b/packages/taler-wallet-core/src/util/query.ts @@ -77,22 +77,6 @@ function requestToPromise(req: IDBRequest): Promise { }); } -function transactionToPromise(tx: IDBTransaction): Promise { - const stack = Error("Failed transaction was started here."); - return new Promise((resolve, reject) => { - tx.onabort = () => { - reject(TransactionAbort); - }; - tx.oncomplete = () => { - resolve(); - }; - tx.onerror = () => { - console.error("Transaction failed:", stack); - reject(tx.error); - }; - }); -} - type CursorResult = CursorEmptyResult | CursorValueResult; interface CursorEmptyResult { @@ -548,6 +532,7 @@ function makeWriteContext( }, }; } + return ctx; } /**