-formatting / don't use deprecated method

This commit is contained in:
Florian Dold 2023-08-23 14:06:37 +02:00
parent 1ee601f70f
commit 2051aded50
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -420,10 +420,10 @@ async function handlePeerPullCreditCreatePurse(
pullIni.exchangeBaseUrl, pullIni.exchangeBaseUrl,
); );
const httpResp = await ws.http.postJson( const httpResp = await ws.http.fetch(reservePurseMergeUrl.href, {
reservePurseMergeUrl.href, method: "POST",
reservePurseReqBody, body: reservePurseReqBody,
); });
if (httpResp.status === HttpStatusCode.UnavailableForLegalReasons) { if (httpResp.status === HttpStatusCode.UnavailableForLegalReasons) {
const respJson = await httpResp.json(); const respJson = await httpResp.json();
@ -759,23 +759,23 @@ export async function initiatePeerPullPayment(
.mktx((x) => [x.peerPullPaymentInitiations, x.contractTerms]) .mktx((x) => [x.peerPullPaymentInitiations, x.contractTerms])
.runReadWrite(async (tx) => { .runReadWrite(async (tx) => {
const ppi: PeerPullPaymentInitiationRecord = { const ppi: PeerPullPaymentInitiationRecord = {
amount: req.partialContractTerms.amount, amount: req.partialContractTerms.amount,
contractTermsHash: hContractTerms, contractTermsHash: hContractTerms,
exchangeBaseUrl: exchangeBaseUrl, exchangeBaseUrl: exchangeBaseUrl,
pursePriv: pursePair.priv, pursePriv: pursePair.priv,
pursePub: pursePair.pub, pursePub: pursePair.pub,
mergePriv: mergePair.priv, mergePriv: mergePair.priv,
mergePub: mergePair.pub, mergePub: mergePair.pub,
status: PeerPullPaymentInitiationStatus.PendingCreatePurse, status: PeerPullPaymentInitiationStatus.PendingCreatePurse,
contractTerms: contractTerms, contractTerms: contractTerms,
mergeTimestamp, mergeTimestamp,
contractEncNonce, contractEncNonce,
mergeReserveRowId: mergeReserveRowId, mergeReserveRowId: mergeReserveRowId,
contractPriv: contractKeyPair.priv, contractPriv: contractKeyPair.priv,
contractPub: contractKeyPair.pub, contractPub: contractKeyPair.pub,
withdrawalGroupId, withdrawalGroupId,
estimatedAmountEffective: wi.withdrawalAmountEffective, estimatedAmountEffective: wi.withdrawalAmountEffective,
} };
await tx.peerPullPaymentInitiations.put(ppi); await tx.peerPullPaymentInitiations.put(ppi);
const oldTxState: TransactionState = { const oldTxState: TransactionState = {
major: TransactionMajorState.None, major: TransactionMajorState.None,