difftreelog
Fix eslint warnings
in: master
41 files changed
tests/src/apiConsts.test.tsdiffbeforeafterbothno syntactic changes
tests/src/app-promotion.seqtest.tsdiffbeforeafterbothno syntactic changes
tests/src/approve.test.tsdiffbeforeafterbothno syntactic changes
tests/src/burnItem.test.tsdiffbeforeafterbothno syntactic changes
tests/src/createCollection.test.tsdiffbeforeafterbothno syntactic changes
tests/src/createMultipleItems.test.tsdiffbeforeafterbothno syntactic changes
tests/src/eth/createFTCollection.test.tsdiffbeforeafterbothno syntactic changes
tests/src/eth/evmCoder.test.tsdiffbeforeafterbothno syntactic changes
tests/src/eth/proxyContract.test.tsdiffbeforeafterbothno syntactic changes
tests/src/eth/scheduling.test.tsdiffbeforeafterbothno syntactic changes
tests/src/eth/util/index.tsdiffbeforeafterbothno syntactic changes
tests/src/fungible.test.tsdiffbeforeafterbothno syntactic changes
tests/src/inflation.seqtest.tsdiffbeforeafterbothno syntactic changes
tests/src/interfaces/unique/definitions.tsdiffbeforeafterbothno syntactic changes
tests/src/limits.test.tsdiffbeforeafterbothno syntactic changes
tests/src/nesting/collectionProperties.seqtest.tsdiffbeforeafterbothno syntactic changes
tests/src/nesting/collectionProperties.test.tsdiffbeforeafterbothno syntactic changes
tests/src/nesting/graphs.test.tsdiffbeforeafterbothno syntactic changes
tests/src/nesting/nest.test.tsdiffbeforeafterbothno syntactic changes
tests/src/nesting/propertyPermissions.test.tsdiffbeforeafterbothno syntactic changes
tests/src/nesting/tokenProperties.seqtest.tsdiffbeforeafterbothno syntactic changes
tests/src/nesting/tokenProperties.test.tsdiffbeforeafterbothno syntactic changes
tests/src/nesting/unnest.test.tsdiffbeforeafterbothno syntactic changes
tests/src/nextSponsoring.test.tsdiffbeforeafterboth52 await token.transfer(alice, {Substrate: bob.address});52 await token.transfer(alice, {Substrate: bob.address});53 expect(await token.getNextSponsored({Substrate: alice.address})).to.be.lessThanOrEqual(SPONSORING_TIMEOUT);53 expect(await token.getNextSponsored({Substrate: alice.address})).to.be.lessThanOrEqual(SPONSORING_TIMEOUT);545455 // Non-existing token 55 // Non-existing token56 expect(await collection.getTokenNextSponsored(0, {Substrate: alice.address})).to.be.null;56 expect(await collection.getTokenNextSponsored(0, {Substrate: alice.address})).to.be.null;57 });57 });585891 await token.transfer(alice, {Substrate: bob.address});91 await token.transfer(alice, {Substrate: bob.address});92 expect(await token.getNextSponsored({Substrate: alice.address})).to.be.lessThanOrEqual(SPONSORING_TIMEOUT);92 expect(await token.getNextSponsored({Substrate: alice.address})).to.be.lessThanOrEqual(SPONSORING_TIMEOUT);939394 // Non-existing token 94 // Non-existing token95 expect(await collection.getTokenNextSponsored(0, {Substrate: alice.address})).to.be.null;95 expect(await collection.getTokenNextSponsored(0, {Substrate: alice.address})).to.be.null;96 });96 });97});97});tests/src/refungible.test.tsdiffbeforeafterbothno syntactic changes
tests/src/removeCollectionAdmin.test.tsdiffbeforeafterbothno syntactic changes
tests/src/rpc.test.tsdiffbeforeafterbothno syntactic changes
tests/src/scheduler.seqtest.tsdiffbeforeafterbothno syntactic changes
tests/src/setCollectionLimits.test.tsdiffbeforeafterbothno syntactic changes
tests/src/setCollectionSponsor.test.tsdiffbeforeafterbothno syntactic changes
tests/src/setPermissions.test.tsdiffbeforeafterbothno syntactic changes
tests/src/transfer.test.tsdiffbeforeafterbothno syntactic changes
tests/src/transferFrom.test.tsdiffbeforeafterbothno syntactic changes
tests/src/util/globalSetup.tsdiffbeforeafterboth20 if (!result) Promise.reject();20 if (!result) Promise.reject();21 });21 });222223 // 3. Configure App Promotion 23 // 3. Configure App Promotion24 const missingPallets = helper.fetchMissingPalletNames([Pallets.AppPromotion]);24 const missingPallets = helper.fetchMissingPalletNames([Pallets.AppPromotion]);25 if (missingPallets.length === 0) {25 if (missingPallets.length === 0) {26 const superuser = await privateKey('//Alice');26 const superuser = await privateKey('//Alice');tests/src/util/index.tsdiffbeforeafterboth41 else {41 else {42 const actualSeed = getTestSeed(seed.filename);42 const actualSeed = getTestSeed(seed.filename);43 let account = helper.util.fromSeed(actualSeed, ss58Format);43 let account = helper.util.fromSeed(actualSeed, ss58Format);44 // here's to hoping that no 44 // here's to hoping that no45 if (!seed.ignoreFundsPresence && ((helper as any)['balance'] == undefined || await (helper as any).balance.getSubstrate(account.address) < MINIMUM_DONOR_FUND)) {45 if (!seed.ignoreFundsPresence && ((helper as any)['balance'] == undefined || await (helper as any).balance.getSubstrate(account.address) < MINIMUM_DONOR_FUND)) {46 console.warn(`${path.basename(seed.filename)}: Not enough funds present on the filename account. Using the default one as the donor instead.`);46 console.warn(`${path.basename(seed.filename)}: Not enough funds present on the filename account. Using the default one as the donor instead.`);47 account = helper.util.fromSeed('//Alice', ss58Format);47 account = helper.util.fromSeed('//Alice', ss58Format);tests/src/util/playgrounds/types.tsdiffbeforeafterbothno syntactic changes
tests/src/util/playgrounds/unique.dev.tsdiffbeforeafterboth168 this.helper = helper;168 this.helper = helper;169 }169 }170170171 /**171 /**172 * Generates accounts with the specified UNQ token balance 172 * Generates accounts with the specified UNQ token balance173 * @param balances balances for generated accounts. Each balance will be multiplied by the token nominal.173 * @param balances balances for generated accounts. Each balance will be multiplied by the token nominal.174 * @param donor donor account for balances174 * @param donor donor account for balances175 * @returns array of newly created accounts175 * @returns array of newly created accounts176 * @example const [acc1, acc2, acc3] = await createAccounts([0n, 10n, 20n], donor); 176 * @example const [acc1, acc2, acc3] = await createAccounts([0n, 10n, 20n], donor);177 */177 */178 createAccounts = async (balances: bigint[], donor: IKeyringPair): Promise<IKeyringPair[]> => {178 createAccounts = async (balances: bigint[], donor: IKeyringPair): Promise<IKeyringPair[]> => {179 let nonce = await this.helper.chain.getNonce(donor.address);179 let nonce = await this.helper.chain.getNonce(donor.address);180 const wait = new WaitGroup(this.helper);180 const wait = new WaitGroup(this.helper);231 const tokenNominal = this.helper.balance.getOneTokenNominal();231 const tokenNominal = this.helper.balance.getOneTokenNominal();232 for (let i = 0; i < accountsToCreate; i++) {232 for (let i = 0; i < accountsToCreate; i++) {233 if (i === 500) { // if there are too many accounts to create233 if (i === 500) { // if there are too many accounts to create234 await Promise.allSettled(transactions); // wait while first 500 (should be 100 for devnode) tx will be settled 234 await Promise.allSettled(transactions); // wait while first 500 (should be 100 for devnode) tx will be settled235 transactions = []; //235 transactions = []; //236 nonce = await this.helper.chain.getNonce(donor.address); // update nonce 236 nonce = await this.helper.chain.getNonce(donor.address); // update nonce237 }237 }238 const recepient = this.helper.util.fromSeed(mnemonicGenerate());238 const recepient = this.helper.util.fromSeed(mnemonicGenerate());239 accounts.push(recepient);239 accounts.push(recepient);402 return promise;402 return promise;403 }403 }404404405 /**405 /**406 * Wait for specified number of blocks406 * Wait for specified number of blocks407 * @param blocksCount number of blocks to wait407 * @param blocksCount number of blocks to wait408 * @returns 408 * @returns409 */409 */410 async newBlocks(blocksCount = 1, timeout?: number): Promise<void> {410 async newBlocks(blocksCount = 1, timeout?: number): Promise<void> {411 timeout = timeout ?? blocksCount * 60_000;411 timeout = timeout ?? blocksCount * 60_000;412 // eslint-disable-next-line no-async-promise-executor412 // eslint-disable-next-line no-async-promise-executortests/src/util/playgrounds/unique.tsdiffbeforeafterboth2420 if (!event) throw Error('Cannot find transfer in events');2420 if (!event) throw Error('Cannot find transfer in events');2421 }2421 }242224222423 /**2423 /**2424 * Get schedule for recepient of vested transfer2424 * Get schedule for recepient of vested transfer2425 * @param address Substrate address of recipient2425 * @param address Substrate address of recipient2426 * @returns 2426 * @returns2427 */2427 */2428 async getVestingSchedules(address: TSubstrateAccount): Promise<{start: bigint, period: bigint, periodCount: bigint, perPeriod: bigint}[]> {2428 async getVestingSchedules(address: TSubstrateAccount): Promise<{start: bigint, period: bigint, periodCount: bigint, perPeriod: bigint}[]> {2429 const schedule = (await this.helper.callRpc('api.query.vesting.vestingSchedules', [address])).toJSON();2429 const schedule = (await this.helper.callRpc('api.query.vesting.vestingSchedules', [address])).toJSON();2430 return schedule.map((schedule: any) => {2430 return schedule.map((schedule: any) => {tests/src/vesting.test.tsdiffbeforeafterbothno syntactic changes
tests/src/xcm/xcmOpal.test.tsdiffbeforeafterboth288 await helper.wait.newBlocks(3);288 await helper.wait.newBlocks(3);289 289290 // The USDT token never paid fees. Its amount not changed from begin value.290 // The USDT token never paid fees. Its amount not changed from begin value.291 // Also check that xcm transfer has been succeeded 291 // Also check that xcm transfer has been succeeded292 expect((await helper.assets.account(ASSET_ID, alice.address))! == ASSET_AMOUNT).to.be.true;292 expect((await helper.assets.account(ASSET_ID, alice.address))! == ASSET_AMOUNT).to.be.true;293 });293 });294 });294 });tests/src/xcm/xcmUnique.test.tsdiffbeforeafterbothno syntactic changes