Fix merge

This commit is contained in:
Arnaud 2025-04-02 17:05:48 +02:00
parent 0a0fed1955
commit 555619a02b
No known key found for this signature in database
GPG Key ID: 69D6CE281FCAE663
4 changed files with 11 additions and 12 deletions

5
package-lock.json generated
View File

@ -9,7 +9,6 @@
"version": "0.1.1",
"license": "MIT",
"dependencies": {
"undici": "^7.7.0",
"valibot": "^1.0.0"
},
"devDependencies": {
@ -26,7 +25,7 @@
"node": ">=20.18.1"
},
"peerDependencies": {
"undici": "^7.0.0"
"undici": "^7.7.0"
}
},
"node_modules/@apidevtools/json-schema-ref-parser": {
@ -3477,4 +3476,4 @@
}
}
}
}
}

View File

@ -86,7 +86,9 @@
"vitest": "^3.1.1"
},
"dependencies": {
"undici": "^7.7.0",
"valibot": "^1.0.0"
},
"peerDependencies": {
"undici": "^7.7.0"
}
}

View File

@ -77,8 +77,6 @@ export class CodexMarketplace {
}: CodexAvailabilityWithoutTypes) {
const availability: CodexAvailability = {
...a,
totalSize: a.totalSize,
duration: a.duration,
minPricePerBytePerSecond: parseInt(a.minPricePerBytePerSecond, 10),
totalCollateral: parseInt(a.totalCollateral, 10),
totalRemainingCollateral: parseInt(a.totalRemainingCollateral, 10),
@ -259,8 +257,6 @@ export class CodexMarketplace {
...p.request,
ask: {
...p.request.ask,
slotSize: p.request.ask.slotSize,
duration: p.request.ask.duration,
proofProbability: parseInt(p.request.ask.proofProbability, 10),
pricePerBytePerSecond: parseInt(
p.request.ask.pricePerBytePerSecond,
@ -352,12 +348,12 @@ export class CodexMarketplace {
method: "POST",
headers: FetchAuthBuilder.build(this.auth),
body: JSON.stringify({
duration: duration,
duration,
pricePerBytePerSecond: pricePerBytePerSecond.toString(),
proofProbability: proofProbability.toString(),
nodes,
collateralPerByte: collateralPerByte.toString(),
expiry: expiry,
expiry,
tolerance,
} satisfies CodexStorageRequestCreateBody),
});

View File

@ -61,6 +61,7 @@ export class CodexNode {
return Fetch.safeJson<CodexSprJsonResponse>(url, {
method: "GET",
headers: {
...FetchAuthBuilder.build(this.auth),
"Content-Type": "application/json",
},
});
@ -69,8 +70,8 @@ export class CodexNode {
return Fetch.safeText(url, {
method: "GET",
headers: {
"Content-Type": "text/plain",
...FetchAuthBuilder.build(this.auth),
"Content-Type": "text/plain",
},
});
}
@ -87,6 +88,7 @@ export class CodexNode {
return Fetch.safeJson<CodexPeerIdJsonResponse>(url, {
method: "GET",
headers: {
...FetchAuthBuilder.build(this.auth),
"Content-Type": "application/json",
},
});
@ -95,8 +97,8 @@ export class CodexNode {
return Fetch.safeText(url, {
method: "GET",
headers: {
"Content-Type": "text/plain",
...FetchAuthBuilder.build(this.auth),
"Content-Type": "text/plain",
},
});
}