diff options
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pay-peer-push-debit.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/pay-peer-push-debit.ts | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay-peer-push-debit.ts b/packages/taler-wallet-core/src/operations/pay-peer-push-debit.ts index 3eed52b91..da779a07d 100644 --- a/packages/taler-wallet-core/src/operations/pay-peer-push-debit.ts +++ b/packages/taler-wallet-core/src/operations/pay-peer-push-debit.ts @@ -31,18 +31,14 @@ import { TalerPreciseTimestamp, TalerProtocolTimestamp, TalerProtocolViolationError, - TalerUriAction, TransactionAction, TransactionMajorState, TransactionMinorState, TransactionState, TransactionType, - decodeCrock, encodeCrock, getRandomBytes, - hash, j2s, - stringifyTalerUri, } from "@gnu-taler/taler-util"; import { HttpResponse, @@ -89,6 +85,9 @@ export async function checkPeerPushDebit( req: CheckPeerPushDebitRequest, ): Promise<CheckPeerPushDebitResponse> { const instructedAmount = Amounts.parseOrThrow(req.amount); + logger.trace( + `checking peer push debit for ${Amounts.stringify(instructedAmount)}`, + ); const coinSelRes = await selectPeerCoins(ws, { instructedAmount }); if (coinSelRes.type === "failure") { throw TalerError.fromDetail( @@ -98,10 +97,12 @@ export async function checkPeerPushDebit( }, ); } + logger.trace(`selected peer coins (len=${coinSelRes.result.coins.length})`); const totalAmount = await getTotalPeerPaymentCost( ws, coinSelRes.result.coins, ); + logger.trace("computed total peer payment cost"); return { exchangeBaseUrl: coinSelRes.result.exchangeBaseUrl, amountEffective: Amounts.stringify(totalAmount), @@ -243,10 +244,6 @@ async function processPeerPushDebitCreateReserve( encryptContractRequest, ); - const econtractHash = encodeCrock( - hash(decodeCrock(econtractResp.econtract.econtract)), - ); - const createPurseUrl = new URL( `purses/${peerPushInitiation.pursePub}/create`, peerPushInitiation.exchangeBaseUrl, |