difftreelog
fix runtime tests
in: master
1 file changed
tests/src/eth/nativeFungible.test.tsdiffbeforeafterboth50 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);525253 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 });565757 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);616263 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 });657366 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);707879 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 });748375 itEth('totalSupply()', async ({helper}) => {84 itEth('totalSupply()', async ({helper}) => {