diff options
author | Sebastian <sebasjm@gmail.com> | 2023-05-22 13:13:40 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-05-22 13:13:40 -0300 |
commit | 708cf016e4ab1e749b86151aa2a9cc548675d63c (patch) | |
tree | 54c5bc6de7a62a6088383fafc8e3970979b1603e /packages/taler-wallet-core/src/operations/pay-peer.ts | |
parent | 76d2524b8b59ca52477f4b0686ccdcee371ecb9e (diff) | |
download | wallet-core-708cf016e4ab1e749b86151aa2a9cc548675d63c.tar.xz |
nominal typing for taskId, also fixing transactionId reference
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pay-peer.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/pay-peer.ts | 12 |
1 files changed, 10 insertions, 2 deletions
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), |