diff options
author | Florian Dold <florian@dold.me> | 2023-08-23 14:06:37 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-08-23 14:06:37 +0200 |
commit | 2051aded501cddac1a4c869fb1f9731ac4523a1e (patch) | |
tree | 697fb2b6f2f3891eca38dfbe241ca4c532918967 /packages/taler-wallet-core | |
parent | 1ee601f70fb894a0d5b49e9800e9f5f3b5c4fc0f (diff) | |
download | wallet-core-2051aded501cddac1a4c869fb1f9731ac4523a1e.tar.xz |
-formatting / don't use deprecated method
Diffstat (limited to 'packages/taler-wallet-core')
-rw-r--r-- | packages/taler-wallet-core/src/operations/pay-peer-pull-credit.ts | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay-peer-pull-credit.ts b/packages/taler-wallet-core/src/operations/pay-peer-pull-credit.ts index ac501aae2..88b441cdd 100644 --- a/packages/taler-wallet-core/src/operations/pay-peer-pull-credit.ts +++ b/packages/taler-wallet-core/src/operations/pay-peer-pull-credit.ts @@ -420,10 +420,10 @@ async function handlePeerPullCreditCreatePurse( pullIni.exchangeBaseUrl, ); - const httpResp = await ws.http.postJson( - reservePurseMergeUrl.href, - reservePurseReqBody, - ); + const httpResp = await ws.http.fetch(reservePurseMergeUrl.href, { + method: "POST", + body: reservePurseReqBody, + }); if (httpResp.status === HttpStatusCode.UnavailableForLegalReasons) { const respJson = await httpResp.json(); @@ -759,23 +759,23 @@ export async function initiatePeerPullPayment( .mktx((x) => [x.peerPullPaymentInitiations, x.contractTerms]) .runReadWrite(async (tx) => { const ppi: PeerPullPaymentInitiationRecord = { - amount: req.partialContractTerms.amount, - contractTermsHash: hContractTerms, - exchangeBaseUrl: exchangeBaseUrl, - pursePriv: pursePair.priv, - pursePub: pursePair.pub, - mergePriv: mergePair.priv, - mergePub: mergePair.pub, - status: PeerPullPaymentInitiationStatus.PendingCreatePurse, - contractTerms: contractTerms, - mergeTimestamp, - contractEncNonce, - mergeReserveRowId: mergeReserveRowId, - contractPriv: contractKeyPair.priv, - contractPub: contractKeyPair.pub, - withdrawalGroupId, - estimatedAmountEffective: wi.withdrawalAmountEffective, - } + amount: req.partialContractTerms.amount, + contractTermsHash: hContractTerms, + exchangeBaseUrl: exchangeBaseUrl, + pursePriv: pursePair.priv, + pursePub: pursePair.pub, + mergePriv: mergePair.priv, + mergePub: mergePair.pub, + status: PeerPullPaymentInitiationStatus.PendingCreatePurse, + contractTerms: contractTerms, + mergeTimestamp, + contractEncNonce, + mergeReserveRowId: mergeReserveRowId, + contractPriv: contractKeyPair.priv, + contractPub: contractKeyPair.pub, + withdrawalGroupId, + estimatedAmountEffective: wi.withdrawalAmountEffective, + }; await tx.peerPullPaymentInitiations.put(ppi); const oldTxState: TransactionState = { major: TransactionMajorState.None, |