Skip to content

Commit

Permalink
fix: erc725.js imports
Browse files Browse the repository at this point in the history
  • Loading branch information
CallumGrindle committed Nov 3, 2023
1 parent adbaadc commit 1a4e210
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
6 changes: 4 additions & 2 deletions src/lib/classes/lsp7-digital-asset.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SUPPORTED_HASH_FUNCTION_HASHES } from '@erc725/erc725.js/build/main/src/constants/constants';
import { SUPPORTED_VERIFICATION_FUNCTION_HASHES } from '@erc725/erc725.js/build/main/src/constants/constants';
import { ERC725YDataKeys } from '@lukso/lsp-smart-contracts';
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers';
import { providers } from 'ethers';
Expand Down Expand Up @@ -232,7 +232,9 @@ describe('LSP7DigitalAsset', () => {

const data = await digitalAsset.getData(ERC725YDataKeys.LSP4.LSP4Metadata);

expect(data.startsWith(SUPPORTED_HASH_FUNCTION_HASHES.HASH_KECCAK256_UTF8)).toBe(true);
expect(data.startsWith(SUPPORTED_VERIFICATION_FUNCTION_HASHES.HASH_KECCAK256_UTF8)).toBe(
true
);
expect(data).toEqual(expectedLSP4Value);
});
it('should have correct name and symbol set', async () => {
Expand Down
6 changes: 4 additions & 2 deletions src/lib/classes/lsp8-identifiable-digital-asset.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SUPPORTED_HASH_FUNCTION_HASHES } from '@erc725/erc725.js/build/main/src/constants/constants';
import { SUPPORTED_VERIFICATION_FUNCTION_HASHES } from '@erc725/erc725.js/build/main/src/constants/constants';
import { ERC725YDataKeys, LSP8_TOKEN_ID_TYPES } from '@lukso/lsp-smart-contracts';
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers';
import { providers } from 'ethers';
Expand Down Expand Up @@ -295,7 +295,9 @@ describe('LSP8IdentifiableDigitalAsset', () => {

const data = await digitalAsset.getData(ERC725YDataKeys.LSP4.LSP4Metadata);

expect(data.startsWith(SUPPORTED_HASH_FUNCTION_HASHES.HASH_KECCAK256_UTF8)).toBe(true);
expect(data.startsWith(SUPPORTED_VERIFICATION_FUNCTION_HASHES.HASH_KECCAK256_UTF8)).toBe(
true
);
expect(data).toEqual(expectedLSP4Value);
});

Expand Down
8 changes: 4 additions & 4 deletions src/lib/classes/universal-profile.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ERC725 } from '@erc725/erc725.js';
import { SUPPORTED_HASH_FUNCTION_HASHES } from '@erc725/erc725.js/build/main/src/constants/constants';
import { SUPPORTED_VERIFICATION_FUNCTION_HASHES } from '@erc725/erc725.js/build/main/src/constants/constants';
import { ALL_PERMISSIONS, ERC725YDataKeys } from '@lukso/lsp-smart-contracts';
import KeyManagerContract from '@lukso/lsp-smart-contracts/artifacts/LSP6KeyManager.json';
import UniversalProfileContract from '@lukso/lsp-smart-contracts/artifacts/UniversalProfile.json';
Expand Down Expand Up @@ -67,9 +67,9 @@ describe('UniversalProfile', () => {

const lsp3Data = await universalProfile.getData(ERC725YDataKeys.LSP3.LSP3Profile);

expect(lsp3Data.startsWith(SUPPORTED_HASH_FUNCTION_HASHES.HASH_KECCAK256_UTF8)).toBe(
true
);
expect(
lsp3Data.startsWith(SUPPORTED_VERIFICATION_FUNCTION_HASHES.HASH_KECCAK256_UTF8)
).toBe(true);
expect(lsp3Data).toEqual(expectedLSP3Value);
});
});
Expand Down

0 comments on commit 1a4e210

Please sign in to comment.