diff options
author | Sebastian <sebasjm@gmail.com> | 2022-10-17 13:36:39 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-10-17 13:36:39 -0300 |
commit | 995b6b4e96e2bd750d2d42f7ff806f4e2efb2d19 (patch) | |
tree | 5635b198da6782049862c28e7130e8fcf4f7a7f1 /packages/taler-wallet-core/src/operations/transactions.ts | |
parent | d1f43ca5f21592a1b1db5cf7e98bb90c02db6eea (diff) | |
download | wallet-core-995b6b4e96e2bd750d2d42f7ff806f4e2efb2d19.tar.xz |
sync parseTx with the new makeTx
Diffstat (limited to 'packages/taler-wallet-core/src/operations/transactions.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/transactions.ts | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/packages/taler-wallet-core/src/operations/transactions.ts b/packages/taler-wallet-core/src/operations/transactions.ts index b9f8dfdc6..5c903a649 100644 --- a/packages/taler-wallet-core/src/operations/transactions.ts +++ b/packages/taler-wallet-core/src/operations/transactions.ts @@ -53,7 +53,12 @@ import { import { InternalWalletState } from "../internal-wallet-state.js"; import { checkDbInvariant } from "../util/invariants.js"; import { RetryTags } from "../util/retries.js"; -import { makeTombstoneId, makeTransactionId, TombstoneTag } from "./common.js"; +import { + makeTombstoneId, + makeTransactionId, + parseTransactionId, + TombstoneTag, +} from "./common.js"; import { processDepositGroup } from "./deposits.js"; import { getExchangeDetails } from "./exchanges.js"; import { @@ -117,9 +122,7 @@ export async function getTransactionById( ws: InternalWalletState, req: TransactionByIdRequest, ): Promise<Transaction> { - const [typeStr, ...rest] = req.transactionId.split(":"); - const type = typeStr as TransactionType; - + const { type, args: rest } = parseTransactionId(req.transactionId); if ( type === TransactionType.Withdrawal || type === TransactionType.PeerPullCredit || |