Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: errors in comments and bug report #32

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/e2e/dispute.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe("SDK E2E Test - Dispute Module", function () {
expect(response.txHash).to.be.a("string").and.not.empty;
});

it("Attach commericial remix PIL to IN_DISPUTE IP asset", async function () {
it("Attach commercial remix PIL to IN_DISPUTE IP asset", async function () {
const response = await expect(
attachLicenseTerms("A", ipIdA, comRemixLicenseTermsId2, waitForTransaction)
).to.not.be.rejected;
Expand Down Expand Up @@ -101,7 +101,7 @@ describe("SDK E2E Test - Dispute Module", function () {
expect(response.licenseTokenIds).to.be.a("array").and.to.have.lengthOf(2);
});

it("Mint license tokens with commericial remix PIL for IN_DISPUTE IP asset", async function () {
it("Mint license tokens with commercial remix PIL for IN_DISPUTE IP asset", async function () {
const response = await expect(
mintLicenseTokens("A", ipIdA, comRemixLicenseTermsId2, 2, accountB.address, waitForTransaction)
).to.not.be.rejected;
Expand Down Expand Up @@ -143,7 +143,7 @@ describe("SDK E2E Test - Dispute Module", function () {
expect(response.royaltyTokensCollected).to.be.a("bigint").and.be.equal(BigInt(commercialRevShare2 * 1000000));
});

step("Captue snapshot", async function () {
step("Capture snapshot", async function () {
const response = await expect(
royaltySnapshot("A", ipIdA, waitForTransaction)
).to.not.be.rejected;
Expand Down Expand Up @@ -664,7 +664,7 @@ describe("SDK E2E Test - Dispute Module", function () {
expect(response.royaltyTokensCollected).to.be.a("bigint").and.be.equal(BigInt(commercialRevShare2 * 1000000));
});

step("Captue snapshot", async function () {
step("Capture snapshot", async function () {
const response = await expect(
royaltySnapshot("B", ipIdB, waitForTransaction)
).to.not.be.rejected;
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/multiLIcenseTerms.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ describe("SDK E2E Test - Register Derivative IP Asset with multiple PILs", funct
});
});

describe("Register a derivative IP asset, parent IP asset with multiple non-commericial and commercial PILs", async function () {
describe("Register a derivative IP asset, parent IP asset with multiple non-commercial and commercial PILs", async function () {
step("Mint a NFT to Wallet A and get a tokenId (tokenIdA)", async function () {
tokenIdA = await mintNFTWithRetry(privateKeyA);
expect(tokenIdA).not.empty;
Expand Down Expand Up @@ -282,4 +282,4 @@ describe("SDK E2E Test - Register Derivative IP Asset with multiple PILs", funct
"Error: LicensingModule__LicenseNotCompatibleForDerivative");
});
});
});
});
18 changes: 9 additions & 9 deletions test/royalty/snapshot.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,29 +70,29 @@ describe("SDK Test", function () {
ipIdC = responseRegisterIpAssetC.ipId;
});

it("Captue snapshot fail as undefined ipId", async function () {
it("Capture snapshot fail as undefined ipId", async function () {
let ipIdA: any;
const response = await expect(
royaltySnapshot("A", ipIdA, waitForTransaction)
).to.be.rejectedWith(`Failed to snapshot: request.royaltyVaultIpId address is invalid: undefined, Address must be a hex value of 20 bytes (40 hex characters) and match its checksum counterpart.`);

});

it("Captue snapshot fail as invalid ipId", async function () {
it("Capture snapshot fail as invalid ipId", async function () {
const response = await expect(
royaltySnapshot("A", "0x0000", waitForTransaction)
).to.be.rejectedWith(`Failed to snapshot: request.royaltyVaultIpId address is invalid: 0x0000, Address must be a hex value of 20 bytes (40 hex characters) and match its checksum counterpart.`);

});

it("Captue snapshot fail as non-existent ipId", async function () {
it("Capture snapshot fail as non-existent ipId", async function () {
let ipIdA: any;
const response = await expect(
royaltySnapshot("A", "0x7F51F6AC36B5d618545345baDbe22E40ed113e2a", waitForTransaction)
).to.be.rejectedWith("Failed to snapshot: The royalty vault IP with id 0x7f51f6AC36B5D618545345badBe22e40eD113e2A is not registered.");
});

it("Captue snapshot by non-owner", async function () {
it("Capture snapshot by non-owner", async function () {
const response = await expect(
royaltySnapshot("B", ipIdA, true)
).to.not.be.rejected;
Expand All @@ -101,13 +101,13 @@ describe("SDK Test", function () {
expect(response.snapshotId).to.be.a("bigint").and.to.be.ok;
});

it("Captue snapshot for no valut account", async function () {
it("Capture snapshot for no valut account", async function () {
const response = await expect(
royaltySnapshot("C", ipIdC, true)
).to.be.rejectedWith("Failed to snapshot: The contract function \"snapshot\" returned no data (\"0x\").");
});

it("Captue snapshot with waitForTransaction: true", async function () {
it("Capture snapshot with waitForTransaction: true", async function () {
await sleep(20);
const response = await expect(
royaltySnapshot("C", ipIdB, true)
Expand All @@ -117,7 +117,7 @@ describe("SDK Test", function () {
expect(response.snapshotId).to.be.a("bigint").and.to.be.ok;
});

it("Captue snapshot with waitForTransaction: false", async function () {
it("Capture snapshot with waitForTransaction: false", async function () {
const response = await expect(
royaltySnapshot("A", ipIdA, false)
).to.not.be.rejected;
Expand All @@ -126,7 +126,7 @@ describe("SDK Test", function () {
expect(response.snapshotId).to.not.be.exist;
});

it("Captue snapshot with waitForTransaction: undefined", async function () {
it("Capture snapshot with waitForTransaction: undefined", async function () {
await sleep(10);
let waitForTransaction: any;
const response = await expect(
Expand All @@ -137,4 +137,4 @@ describe("SDK Test", function () {
expect(response.snapshotId).to.not.be.exist;
});
});
});
});