mirror of
https://github.com/logos-storage/logos-storage-js.git
synced 2026-01-04 06:23:06 +00:00
Replace collateral by collateralPerByte
This commit is contained in:
parent
bf61eefea9
commit
c94d7a1257
@ -121,8 +121,8 @@ describe("marketplace", () => {
|
|||||||
it("returns an error when trying to create an availability without total size", async () => {
|
it("returns an error when trying to create an availability without total size", async () => {
|
||||||
const response = await marketplace.createAvailability({
|
const response = await marketplace.createAvailability({
|
||||||
duration: 3000,
|
duration: 3000,
|
||||||
maxCollateral: 1,
|
totalCollateral: 1,
|
||||||
minPrice: 100,
|
minPricePerBytePerSecond: 100,
|
||||||
} as any);
|
} as any);
|
||||||
|
|
||||||
assert.deepStrictEqual(response, missingNumberValidationError("totalSize"));
|
assert.deepStrictEqual(response, missingNumberValidationError("totalSize"));
|
||||||
@ -131,8 +131,8 @@ describe("marketplace", () => {
|
|||||||
it("returns an error when trying to create an availability with an invalid number valid", async () => {
|
it("returns an error when trying to create an availability with an invalid number valid", async () => {
|
||||||
const response = await marketplace.createAvailability({
|
const response = await marketplace.createAvailability({
|
||||||
duration: 3000,
|
duration: 3000,
|
||||||
maxCollateral: 1,
|
totalCollateral: 1,
|
||||||
minPrice: 100,
|
minPricePerBytePerSecond: 100,
|
||||||
totalSize: "abc",
|
totalSize: "abc",
|
||||||
} as any);
|
} as any);
|
||||||
|
|
||||||
@ -156,8 +156,8 @@ describe("marketplace", () => {
|
|||||||
it("returns an error when trying to create an availability without duration", async () => {
|
it("returns an error when trying to create an availability without duration", async () => {
|
||||||
const response = await marketplace.createAvailability({
|
const response = await marketplace.createAvailability({
|
||||||
totalSize: 3000,
|
totalSize: 3000,
|
||||||
maxCollateral: 1,
|
totalCollateral: 1,
|
||||||
minPrice: 100,
|
minPricePerBytePerSecond: 100,
|
||||||
} as any);
|
} as any);
|
||||||
|
|
||||||
assert.deepStrictEqual(response, missingNumberValidationError("duration"));
|
assert.deepStrictEqual(response, missingNumberValidationError("duration"));
|
||||||
@ -177,7 +177,7 @@ describe("marketplace", () => {
|
|||||||
it("returns an error when trying to create an availability without min price", async () => {
|
it("returns an error when trying to create an availability without min price", async () => {
|
||||||
const response = await marketplace.createAvailability({
|
const response = await marketplace.createAvailability({
|
||||||
totalSize: 3000,
|
totalSize: 3000,
|
||||||
maxCollateral: 1,
|
totalCollateral: 1,
|
||||||
duration: 100,
|
duration: 100,
|
||||||
} as any);
|
} as any);
|
||||||
|
|
||||||
@ -187,7 +187,7 @@ describe("marketplace", () => {
|
|||||||
it("returns an error when trying to create an availability without max collateral", async () => {
|
it("returns an error when trying to create an availability without max collateral", async () => {
|
||||||
const response = await marketplace.createAvailability({
|
const response = await marketplace.createAvailability({
|
||||||
totalSize: 3000,
|
totalSize: 3000,
|
||||||
minPrice: 100,
|
minPricePerBytePerSecond: 100,
|
||||||
duration: 100,
|
duration: 100,
|
||||||
} as any);
|
} as any);
|
||||||
|
|
||||||
@ -201,7 +201,7 @@ describe("marketplace", () => {
|
|||||||
const response = await marketplace.createAvailability({
|
const response = await marketplace.createAvailability({
|
||||||
maxCollateral: 1,
|
maxCollateral: 1,
|
||||||
totalSize: 3000,
|
totalSize: 3000,
|
||||||
minPrice: 100,
|
minPricePerBytePerSecond: 100,
|
||||||
duration: 100,
|
duration: 100,
|
||||||
hello: "world",
|
hello: "world",
|
||||||
} as any);
|
} as any);
|
||||||
|
|||||||
@ -254,7 +254,7 @@ export class CodexMarketplace {
|
|||||||
pricePerBytePerSecond: pricePerBytePerSecond.toString(),
|
pricePerBytePerSecond: pricePerBytePerSecond.toString(),
|
||||||
proofProbability: proofProbability.toString(),
|
proofProbability: proofProbability.toString(),
|
||||||
nodes,
|
nodes,
|
||||||
collateral: collateralPerByte.toString(),
|
collateralPerByte: collateralPerByte.toString(),
|
||||||
expiry: expiry.toString(),
|
expiry: expiry.toString(),
|
||||||
tolerance,
|
tolerance,
|
||||||
}),
|
}),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user