aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/pay-peer.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-10-14 22:47:11 +0200
committerFlorian Dold <florian@dold.me>2022-10-14 22:47:11 +0200
commit0c8e56c32457ea9b9229a8a3607fcf8e7618bc17 (patch)
treed0b4bbe4e199d62426e722b803fdfa178cd6f3a0 /packages/taler-wallet-core/src/operations/pay-peer.ts
parenteec6695be0409669fcad36c6cc7ea01f48d41c97 (diff)
downloadwallet-core-0c8e56c32457ea9b9229a8a3607fcf8e7618bc17.tar.xz
wallet-core: properly separate different types of IDs
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pay-peer.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/pay-peer.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay-peer.ts b/packages/taler-wallet-core/src/operations/pay-peer.ts
index e9185a9d4..8bce887c0 100644
--- a/packages/taler-wallet-core/src/operations/pay-peer.ts
+++ b/packages/taler-wallet-core/src/operations/pay-peer.ts
@@ -73,7 +73,7 @@ import { InternalWalletState } from "../internal-wallet-state.js";
import { readSuccessResponseJsonOrThrow } from "../util/http.js";
import { checkDbInvariant } from "../util/invariants.js";
import { GetReadOnlyAccess } from "../util/query.js";
-import { spendCoins, makeEventId } from "../operations/common.js";
+import { spendCoins, makeTransactionId } from "../operations/common.js";
import { updateExchangeFromUrl } from "./exchanges.js";
import { internalCreateWithdrawalGroup } from "./withdraw.js";
@@ -261,7 +261,7 @@ export async function initiatePeerToPeerPush(
}
await spendCoins(ws, tx, {
- allocationId: `peer-push:${pursePair.pub}`,
+ allocationId: `txn:peer-push-debit:${pursePair.pub}`,
coinPubs: sel.coins.map((x) => x.coinPub),
contributions: sel.coins.map((x) =>
Amounts.parseOrThrow(x.contribution),
@@ -340,7 +340,7 @@ export async function initiatePeerToPeerPush(
exchangeBaseUrl: coinSelRes.exchangeBaseUrl,
contractPriv: econtractResp.contractPriv,
}),
- transactionId: makeEventId(TransactionType.PeerPushDebit, pursePair.pub),
+ transactionId: makeTransactionId(TransactionType.PeerPushDebit, pursePair.pub),
};
}
@@ -551,7 +551,7 @@ export async function acceptPeerPushPayment(
});
return {
- transactionId: makeEventId(
+ transactionId: makeTransactionId(
TransactionType.PeerPushCredit,
wg.withdrawalGroupId,
),
@@ -596,7 +596,7 @@ export async function acceptPeerPullPayment(
}
await spendCoins(ws, tx, {
- allocationId: `peer-pull:${req.peerPullPaymentIncomingId}`,
+ allocationId: `txn:peer-pull-debit:${req.peerPullPaymentIncomingId}`,
coinPubs: sel.coins.map((x) => x.coinPub),
contributions: sel.coins.map((x) =>
Amounts.parseOrThrow(x.contribution),
@@ -643,7 +643,7 @@ export async function acceptPeerPullPayment(
logger.trace(`purse deposit response: ${j2s(resp)}`);
return {
- transactionId: makeEventId(
+ transactionId: makeTransactionId(
TransactionType.PeerPullDebit,
req.peerPullPaymentIncomingId,
),
@@ -839,7 +839,7 @@ export async function initiatePeerRequestForPay(
exchangeBaseUrl: req.exchangeBaseUrl,
contractPriv: econtractResp.contractPriv,
}),
- transactionId: makeEventId(
+ transactionId: makeTransactionId(
TransactionType.PeerPullCredit,
wg.withdrawalGroupId,
),