From 708cf016e4ab1e749b86151aa2a9cc548675d63c Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 22 May 2023 13:13:40 -0300 Subject: nominal typing for taskId, also fixing transactionId reference --- packages/taler-wallet-core/src/operations/pay-peer.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'packages/taler-wallet-core/src/operations/pay-peer.ts') diff --git a/packages/taler-wallet-core/src/operations/pay-peer.ts b/packages/taler-wallet-core/src/operations/pay-peer.ts index 3b4572900..d9db60e83 100644 --- a/packages/taler-wallet-core/src/operations/pay-peer.ts +++ b/packages/taler-wallet-core/src/operations/pay-peer.ts @@ -705,7 +705,11 @@ export async function initiatePeerPushDebit( // we might want to mark the coins as used and spend them // after we've been able to create the purse. await spendCoins(ws, tx, { - allocationId: `txn:peer-push-debit:${pursePair.pub}`, + // allocationId: `txn:peer-push-debit:${pursePair.pub}`, + allocationId: constructTransactionIdentifier({ + tag: TransactionType.PeerPushDebit, + pursePub: pursePair.pub, + }), coinPubs: sel.coins.map((x) => x.coinPub), contributions: sel.coins.map((x) => Amounts.parseOrThrow(x.contribution), @@ -1280,7 +1284,11 @@ export async function confirmPeerPullDebit( ]) .runReadWrite(async (tx) => { await spendCoins(ws, tx, { - allocationId: `txn:peer-pull-debit:${req.peerPullPaymentIncomingId}`, + // allocationId: `txn:peer-pull-debit:${req.peerPullPaymentIncomingId}`, + allocationId: constructTransactionIdentifier({ + tag: TransactionType.PeerPullDebit, + peerPullPaymentIncomingId: req.peerPullPaymentIncomingId, + }), coinPubs: sel.coins.map((x) => x.coinPub), contributions: sel.coins.map((x) => Amounts.parseOrThrow(x.contribution), -- cgit v1.2.3