diff options
author | Florian Dold <florian@dold.me> | 2023-11-16 11:11:18 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-11-16 11:11:18 +0100 |
commit | da3122c7a812d4c425f61c1e159a8275d9cf4e3a (patch) | |
tree | f4328ed3465620d847ca1b806df7dbbfe71a1993 | |
parent | c5f63c097a6f7b07edfa7a481ac37ea45966d04a (diff) |
wallet-core: do not return talerUri from peer push initiation
URI might not be ready to use yet!
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, |