summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/common.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/operations/common.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/common.ts36
1 files changed, 0 insertions, 36 deletions
diff --git a/packages/taler-wallet-core/src/operations/common.ts b/packages/taler-wallet-core/src/operations/common.ts
index c3dc622d7..95551010c 100644
--- a/packages/taler-wallet-core/src/operations/common.ts
+++ b/packages/taler-wallet-core/src/operations/common.ts
@@ -362,42 +362,6 @@ export enum TombstoneTag {
DeletePeerPushCredit = "delete-peer-push-credit",
}
-/**
- * Create an event ID from the type and the primary key for the event.
- *
- * @deprecated use constructTransactionIdentifier instead
- */
-export function makeTransactionId(
- type: TransactionType,
- ...args: string[]
-): string {
- return `txn:${type}:${args.map((x) => encodeURIComponent(x)).join(":")}`;
-}
-
-export function parseId(
- idType: "txn" | "tmb" | "any",
- txId: string,
-): {
- type: TransactionType;
- args: string[];
-} {
- const txnParts = txId.split(":");
- if (txnParts.length < 3) {
- throw Error("id should have al least 3 parts separated by ':'");
- }
- const [prefix, typeStr, ...args] = txnParts;
- const type = typeStr as TransactionType;
-
- if (idType != "any" && prefix !== idType) {
- throw Error(`id should start with ${idType}`);
- }
-
- if (args.length === 0) {
- throw Error("id should have one or more arguments");
- }
-
- return { type, args };
-}
/**
* Create an event ID from the type and the primary key for the event.