git.delta.rocks / unique-network / refs/commits / e5a95d62a453

difftreelog

fix runtime tests

Trubnikov Sergey2023-05-10parent: #9b83664.patch.diff
in: master

1 file changed

modifiedtests/src/eth/nativeFungible.test.tsdiffbeforeafterboth
50 const collectionAddress = helper.ethAddress.fromCollectionId(0);50 const collectionAddress = helper.ethAddress.fromCollectionId(0);
51 const contract = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner);51 const contract = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner);
5252
53 const realDecimals = (await helper.chain.getChainProperties().tokenDecimals)[0].toString();
53 const decimals = await contract.methods.decimals().call({from: owner});54 const decimals = await contract.methods.decimals().call({from: owner});
54 expect(decimals).to.be.eq('18');55 expect(decimals).to.be.eq(realDecimals);
55 });56 });
5657
57 itEth('name()', async ({helper}) => {58 itEth('name()', async ({helper}) => {
58 const owner = await helper.eth.createAccountWithBalance(donor);59 const owner = await helper.eth.createAccountWithBalance(donor);
59 const collectionAddress = helper.ethAddress.fromCollectionId(0);60 const collectionAddress = helper.ethAddress.fromCollectionId(0);
60 const contract = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner);61 const contract = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner);
6162
63 let realName;
64 switch ((await helper.chain.getChainProperties().tokenSymbol)[0]) {
65 case 'OPL': realName = 'opal'; break;
66 case 'QTZ': realName = 'quartz'; break;
67 case 'UNC': realName = 'unique'; break;
68 default: realName = ''; break;
69 }
62 const name = await contract.methods.name().call({from: owner});70 const name = await contract.methods.name().call({from: owner});
63 expect(name).to.be.eq('opal');71 expect(name).to.be.eq(realName);
64 });72 });
6573
66 itEth('symbol()', async ({helper}) => {74 itEth('symbol()', async ({helper}) => {
67 const owner = await helper.eth.createAccountWithBalance(donor);75 const owner = await helper.eth.createAccountWithBalance(donor);
68 const collectionAddress = helper.ethAddress.fromCollectionId(0);76 const collectionAddress = helper.ethAddress.fromCollectionId(0);
69 const contract = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner);77 const contract = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner);
7078
79 const realName = (await helper.chain.getChainProperties().tokenSymbol)[0];
71 const name = await contract.methods.symbol().call({from: owner});80 const name = await contract.methods.symbol().call({from: owner});
72 expect(name).to.be.eq('OPL');81 expect(name).to.be.eq(realName);
73 });82 });
7483
75 itEth('totalSupply()', async ({helper}) => {84 itEth('totalSupply()', async ({helper}) => {