diff options
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 55015f2e0..c3dc622d7 100644 --- a/packages/taler-wallet-core/src/operations/common.ts +++ b/packages/taler-wallet-core/src/operations/common.ts @@ -54,6 +54,7 @@ import { RetryInfo, } from "../util/retries.js"; import { CryptoApiStoppedError } from "../crypto/workers/crypto-dispatcher.js"; +import { TaskId } from "../pending-types.js"; const logger = new Logger("operations/common.ts"); @@ -260,7 +261,7 @@ export async function storeOperationPending( export async function runOperationWithErrorReporting<T1, T2>( ws: InternalWalletState, - opId: string, + opId: TaskId, f: () => Promise<OperationAttemptResult<T1, T2>>, ): Promise<OperationAttemptResult<T1, T2>> { let maybeError: TalerErrorDetail | undefined; @@ -369,7 +370,7 @@ export enum TombstoneTag { export function makeTransactionId( type: TransactionType, ...args: string[] -): TransactionIdStr { +): string { return `txn:${type}:${args.map((x) => encodeURIComponent(x)).join(":")}`; } @@ -401,10 +402,7 @@ export function parseId( /** * Create an event ID from the type and the primary key for the event. */ -export function makeTombstoneId( - type: TombstoneTag, - ...args: string[] -): TombstoneIdStr { +export function makeTombstoneId(type: TombstoneTag, ...args: string[]): string { return `tmb:${type}:${args.map((x) => encodeURIComponent(x)).join(":")}`; } |