diff options
author | Florian Dold <florian@dold.me> | 2024-01-15 17:36:50 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-01-15 18:43:20 +0100 |
commit | 8da08fe4205c1e03eec3d4925c598be0b6769ba5 (patch) | |
tree | e81d59fa7a1ef40687fc16199e4d44dd70e02b5c /packages/taler-wallet-core/src/operations/common.ts | |
parent | 68f3bcdc6cece62176849ab065e82630ebc4deae (diff) | |
download | wallet-core-8da08fe4205c1e03eec3d4925c598be0b6769ba5.tar.xz |
wallet-core: uniform transaction interface, cleanup
Diffstat (limited to 'packages/taler-wallet-core/src/operations/common.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/common.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/packages/taler-wallet-core/src/operations/common.ts b/packages/taler-wallet-core/src/operations/common.ts index 1103b7255..f34190cef 100644 --- a/packages/taler-wallet-core/src/operations/common.ts +++ b/packages/taler-wallet-core/src/operations/common.ts @@ -76,10 +76,7 @@ import { PendingTaskType, TaskId } from "../pending-types.js"; import { assertUnreachable } from "../util/assertUnreachable.js"; import { checkDbInvariant, checkLogicInvariant } from "../util/invariants.js"; import { GetReadOnlyAccess, GetReadWriteAccess } from "../util/query.js"; -import { - constructTransactionIdentifier, - parseTransactionIdentifier, -} from "./transactions.js"; +import { constructTransactionIdentifier } from "./transactions.js"; const logger = new Logger("operations/common.ts"); @@ -1086,11 +1083,12 @@ export enum TransitionResult { /** * Transaction context. - * - * FIXME: Should eventually be implemented by all transactions. + * Uniform interface to all transactions. */ export interface TransactionContext { abortTransaction(): Promise<void>; + suspendTransaction(): Promise<void>; resumeTransaction(): Promise<void>; failTransaction(): Promise<void>; + deleteTransaction(): Promise<void>; } |