return transaction context
This commit is contained in:
parent
029b07be4b
commit
2d4a53f522
@ -1510,10 +1510,6 @@ export interface RecoupGroupRecord {
|
|||||||
lastError: TalerErrorDetails | undefined;
|
lastError: TalerErrorDetails | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ImportPayloadType {
|
|
||||||
CoreSchema = "core-schema",
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum BackupProviderStatus {
|
export enum BackupProviderStatus {
|
||||||
PaymentRequired = "payment-required",
|
PaymentRequired = "payment-required",
|
||||||
Ready = "ready",
|
Ready = "ready",
|
||||||
|
@ -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>;
|
type CursorResult<T> = CursorEmptyResult<T> | CursorValueResult<T>;
|
||||||
|
|
||||||
interface CursorEmptyResult<T> {
|
interface CursorEmptyResult<T> {
|
||||||
@ -548,6 +532,7 @@ function makeWriteContext(
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
return ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user