aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-11-16 11:11:18 +0100
committerFlorian Dold <florian@dold.me>2023-11-16 11:11:18 +0100
commitda3122c7a812d4c425f61c1e159a8275d9cf4e3a (patch)
treef4328ed3465620d847ca1b806df7dbbfe71a1993
parentc5f63c097a6f7b07edfa7a481ac37ea45966d04a (diff)
wallet-core: do not return talerUri from peer push initiation
URI might not be ready to use yet!
-rw-r--r--packages/taler-util/src/wallet-types.ts1
-rw-r--r--packages/taler-wallet-core/src/operations/pay-peer-push-credit.ts6
-rw-r--r--packages/taler-wallet-core/src/operations/pay-peer-push-debit.ts5
3 files changed, 6 insertions, 6 deletions
diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts
index 447068188..7a4ad91e8 100644
--- a/packages/taler-util/src/wallet-types.ts
+++ b/packages/taler-util/src/wallet-types.ts
@@ -2443,7 +2443,6 @@ export interface InitiatePeerPushDebitResponse {
pursePub: string;
mergePriv: string;
contractPriv: string;
- talerUri: string;
transactionId: TransactionIdStr;
}
diff --git a/packages/taler-wallet-core/src/operations/pay-peer-push-credit.ts b/packages/taler-wallet-core/src/operations/pay-peer-push-credit.ts
index e4698c203..38328171d 100644
--- a/packages/taler-wallet-core/src/operations/pay-peer-push-credit.ts
+++ b/packages/taler-wallet-core/src/operations/pay-peer-push-credit.ts
@@ -166,11 +166,17 @@ export async function preparePeerPushCredit(
const purseHttpResp = await ws.http.fetch(getPurseUrl.href);
+ const contractTerms = codecForPeerContractTerms().decode(dec.contractTerms);
+
const purseStatus = await readSuccessResponseJsonOrThrow(
purseHttpResp,
codecForExchangePurseStatus(),
);
+ logger.info(
+ `peer push credit, purse balance ${purseStatus.balance}, contract amount ${contractTerms.amount}`,
+ );
+
const peerPushCreditId = encodeCrock(getRandomBytes(32));
const contractTermsHash = ContractTermsUtil.hashContractTerms(
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 284486506..db4b63657 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
@@ -701,11 +701,6 @@ export async function initiatePeerPushDebit(
mergePriv: mergePair.priv,
pursePub: pursePair.pub,
exchangeBaseUrl: coinSelRes.result.exchangeBaseUrl,
- talerUri: stringifyTalerUri({
- type: TalerUriAction.PayPush,
- exchangeBaseUrl: coinSelRes.result.exchangeBaseUrl,
- contractPriv: contractKeyPair.priv,
- }),
transactionId: constructTransactionIdentifier({
tag: TransactionType.PeerPushDebit,
pursePub: pursePair.pub,