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

difftreelog

fix test name()

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

2 files changed

modifiedtests/src/eth/nativeFungible.test.tsdiffbeforeafterboth
1616
17import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';
18import {expect, itEth, usingEthPlaygrounds} from './util';18import {expect, itEth, usingEthPlaygrounds} from './util';
19import {UniqueHelper} from '../util/playgrounds/unique';
1920
20describe('NativeFungible: ERC20 calls', () => {21describe('NativeFungible: ERC20 calls', () => {
21 let donor: IKeyringPair;22 let donor: IKeyringPair;
60 const collectionAddress = helper.ethAddress.fromCollectionId(0);61 const collectionAddress = helper.ethAddress.fromCollectionId(0);
61 const contract = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner);62 const contract = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner);
6263
63 let realName;
64 switch ((await helper.chain.getChainProperties().tokenSymbol)[0]) {64 const realName = await UniqueHelper.detectNetwork(helper.getApi());
65 case 'OPL': realName = 'opal'; break;
66 case 'QTZ': realName = 'quartz'; break;
67 case 'UNC': realName = 'unique'; break;
68 default: realName = ''; break;
69 }
70 const name = await contract.methods.name().call({from: owner});65 const name = await contract.methods.name().call({from: owner});
71 expect(name).to.be.eq(realName);66 expect(name).to.be.eq(realName);
72 });67 });
modifiedtests/src/util/playgrounds/unique.tsdiffbeforeafterboth
498498
499 if (xcmChains.indexOf(spec.specName) > -1) return spec.specName;499 if (xcmChains.indexOf(spec.specName) > -1) return spec.specName;
500500
501 if (['quartz', 'unique'].indexOf(spec.specName) > -1) return spec.specName;501 if (['quartz', 'unique', 'sapphire'].indexOf(spec.specName) > -1) return spec.specName;
502 return 'opal';502 return 'opal';
503 }503 }
504504