difftreelog
fix test name()
in: master
2 files changed
tests/src/eth/nativeFungible.test.tsdiffbeforeafterboth--- a/tests/src/eth/nativeFungible.test.ts
+++ b/tests/src/eth/nativeFungible.test.ts
@@ -16,6 +16,7 @@
import {IKeyringPair} from '@polkadot/types/types';
import {expect, itEth, usingEthPlaygrounds} from './util';
+import {UniqueHelper} from '../util/playgrounds/unique';
describe('NativeFungible: ERC20 calls', () => {
let donor: IKeyringPair;
@@ -60,13 +61,7 @@
const collectionAddress = helper.ethAddress.fromCollectionId(0);
const contract = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner);
- let realName;
- switch ((await helper.chain.getChainProperties().tokenSymbol)[0]) {
- case 'OPL': realName = 'opal'; break;
- case 'QTZ': realName = 'quartz'; break;
- case 'UNC': realName = 'unique'; break;
- default: realName = ''; break;
- }
+ const realName = await UniqueHelper.detectNetwork(helper.getApi());
const name = await contract.methods.name().call({from: owner});
expect(name).to.be.eq(realName);
});
tests/src/util/playgrounds/unique.tsdiffbeforeafterboth498498499 if (xcmChains.indexOf(spec.specName) > -1) return spec.specName;499 if (xcmChains.indexOf(spec.specName) > -1) return spec.specName;500500501 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