aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-06-09 16:20:50 +0200
committerFlorian Dold <florian@dold.me>2021-06-09 16:20:50 +0200
commit2d4a53f5221274982954a6377e948f3aa441c083 (patch)
tree7c21be0998863dcc7f38562a60edffae10eb5e5f
parent029b07be4b305ba6f1738fc73d2d40b98f6905a7 (diff)
return transaction context
-rw-r--r--packages/taler-wallet-core/src/db.ts4
-rw-r--r--packages/taler-wallet-core/src/util/query.ts17
2 files changed, 1 insertions, 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<any> {
});
}
-function transactionToPromise(tx: IDBTransaction): Promise<void> {
- 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<T> = CursorEmptyResult<T> | CursorValueResult<T>;
interface CursorEmptyResult<T> {
@@ -548,6 +532,7 @@ function makeWriteContext(
},
};
}
+ return ctx;
}
/**