Skip to content

Commit

Permalink
fix: build issues with newer dep versions (Open-Attestation#167)
Browse files Browse the repository at this point in the history
* fix: hardhat config

* fix: assert issue
  • Loading branch information
superical committed Apr 6, 2023
1 parent 0da77e7 commit 1515feb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ const config: HardhatUserConfig = {
/**
* Ethereum
*/
mainnet: ETHERSCAN_API_KEY,
goerli: ETHERSCAN_API_KEY,
mainnet: ETHERSCAN_API_KEY!,
goerli: ETHERSCAN_API_KEY!,
/**
* Polygon
*/
polygon: POLYGONSCAN_API_KEY,
polygonMumbai: POLYGONSCAN_API_KEY,
polygon: POLYGONSCAN_API_KEY!,
polygonMumbai: POLYGONSCAN_API_KEY!,
},
},
networks: {
Expand Down
4 changes: 2 additions & 2 deletions test/SigHelper.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe("SigHelper", async () => {

it("should cancel successfully", async () => {
const initStatus = await sigHelperMock.cancelled(fakeHash);
assert(!initStatus, "Initial status should be false");
assert.isOk(!initStatus, "Initial status should be false");

await sigHelperMock.cancelHashInternal(fakeHash);

Expand All @@ -81,7 +81,7 @@ describe("SigHelper", async () => {
it("should not cancel an already cancelled hash", async () => {
await sigHelperMock.cancelHashInternal(fakeHash);
const initStatus = await sigHelperMock.cancelled(fakeHash);
assert(initStatus, "Initial status should be true");
assert.isOk(initStatus, "Initial status should be true");

const tx = sigHelperMock.cancelHashInternal(fakeHash);

Expand Down
8 changes: 4 additions & 4 deletions test/TitleEscrowSignable.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ describe("TitleEscrowSignable", async () => {
const [, invalidNominee] = users.others;
await titleEscrowContractAsBeneficiary.nominate(invalidNominee.address);
const onChainNominee = await titleEscrowContract.nominee();
assert(onChainNominee === invalidNominee.address, "Wrong on-chain nominee");
assert.isOk(onChainNominee === invalidNominee.address, "Wrong on-chain nominee");

const tx = titleEscrowContractAsBeneficiary.transferBeneficiaryWithSig(endorsement, sig);

Expand Down Expand Up @@ -396,7 +396,7 @@ describe("TitleEscrowSignable", async () => {
it("should transfer beneficiary successfully if on-chain nominee is same as endorsed nominee", async () => {
await titleEscrowContractAsBeneficiary.nominate(nominee.address);
const onChainNominee = await titleEscrowContract.nominee();
assert(onChainNominee === nominee.address, "On-chain nominee is different from endorsed nominee");
assert.isOk(onChainNominee === nominee.address, "On-chain nominee is different from endorsed nominee");

await titleEscrowContractAsBeneficiary.transferBeneficiaryWithSig(endorsement, sig);
const res = await titleEscrowContract.beneficiary();
Expand All @@ -416,7 +416,7 @@ describe("TitleEscrowSignable", async () => {
it("should revert if Beneficiary Transfer is cancelled", async () => {
await titleEscrowContract.connect(users.holder).cancelBeneficiaryTransfer(endorsement);
const cancelStatus = await titleEscrowContract.cancelled(hashStruct);
assert(cancelStatus, "Beneficiary Transfer is not cancelled");
assert.isOk(cancelStatus, "Beneficiary Transfer is not cancelled");

const tx = titleEscrowContractAsBeneficiary.transferBeneficiaryWithSig(endorsement, sig);

Expand Down Expand Up @@ -444,7 +444,7 @@ describe("TitleEscrowSignable", async () => {

it("should add correct hash to cancel", async () => {
const initStatus = await titleEscrowContract.cancelled(hashStruct);
assert(!initStatus, "Initial cancel status should be false");
assert.isOk(!initStatus, "Initial cancel status should be false");

await titleEscrowContractAsEndorsingHolder.cancelBeneficiaryTransfer(endorsement);

Expand Down
6 changes: 3 additions & 3 deletions test/token/SBTUpgradeable.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe("SBTUpgradeable", async () => {

it("should revert when token ID exists", async () => {
const exists = await mockSbtContract.existsInternal(tokenId);
assert(exists, "Token already exists");
assert.isOk(exists, "Token already exists");

const tx = mockSbtContract.safeMintInternal(recipient, tokenId);

Expand All @@ -104,7 +104,7 @@ describe("SBTUpgradeable", async () => {

it("should increase balance by one", async () => {
const balance = await mockSbtContract.balanceOf(recipient);
assert(balance.eq(1), "Balance should be 1");
assert.isOk(balance.eq(1), "Balance should be 1");

await mockSbtContract.safeMintInternal(recipient, faker.finance.ethereumAddress());
const newBalance = await mockSbtContract.balanceOf(recipient);
Expand Down Expand Up @@ -211,7 +211,7 @@ describe("SBTUpgradeable", async () => {
await mockSbtContract.safeMintInternal(recipient, faker.datatype.hexaDecimal(64));

const balance = await mockSbtContract.balanceOf(recipient);
assert(balance.eq(2), "Balance should be 2");
assert.isOk(balance.eq(2), "Balance should be 2");

burnTx = await mockSbtContract.burn(tokenId);
});
Expand Down

0 comments on commit 1515feb

Please sign in to comment.