From b4ab2fcdf3e1bbc0ca9096661a1812481dca58b3 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Fri, 8 Mar 2024 01:06:13 +0100 Subject: wallet-core: remove deprecated peer...PaymentId --- .../taler-wallet-core/src/pay-peer-push-credit.ts | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'packages/taler-wallet-core/src/pay-peer-push-credit.ts') diff --git a/packages/taler-wallet-core/src/pay-peer-push-credit.ts b/packages/taler-wallet-core/src/pay-peer-push-credit.ts index f6ba429a6..ecc1e827f 100644 --- a/packages/taler-wallet-core/src/pay-peer-push-credit.ts +++ b/packages/taler-wallet-core/src/pay-peer-push-credit.ts @@ -901,20 +901,14 @@ export async function confirmPeerPushCredit( ): Promise { let peerInc: PeerPushPaymentIncomingRecord | undefined; let peerPushCreditId: string; - if (req.peerPushCreditId) { - peerPushCreditId = req.peerPushCreditId; - } else if (req.transactionId) { - const parsedTx = parseTransactionIdentifier(req.transactionId); - if (!parsedTx) { - throw Error("invalid transaction ID"); - } - if (parsedTx.tag !== TransactionType.PeerPushCredit) { - throw Error("invalid transaction ID type"); - } - peerPushCreditId = parsedTx.peerPushCreditId; - } else { - throw Error("no transaction ID (or deprecated peerPushCreditId) provided"); + const parsedTx = parseTransactionIdentifier(req.transactionId); + if (!parsedTx) { + throw Error("invalid transaction ID"); + } + if (parsedTx.tag !== TransactionType.PeerPushCredit) { + throw Error("invalid transaction ID type"); } + peerPushCreditId = parsedTx.peerPushCreditId; logger.trace(`confirming peer-push-credit ${peerPushCreditId}`); @@ -934,7 +928,7 @@ export async function confirmPeerPushCredit( if (!peerInc) { throw Error( - `can't accept unknown incoming p2p push payment (${req.peerPushCreditId})`, + `can't accept unknown incoming p2p push payment (${req.transactionId})`, ); } -- cgit v1.2.3