git.delta.rocks / unique-network / refs/commits / 72b9c7cadf1d

difftreelog

Fix eslint warnings

Max Andreev2022-12-22parent: #6fb759d.patch.diff
in: master

41 files changed

modifiedtests/src/apiConsts.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/app-promotion.seqtest.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/approve.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/burnItem.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/createCollection.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/createMultipleItems.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/eth/createFTCollection.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/eth/evmCoder.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/eth/proxyContract.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/eth/scheduling.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/eth/util/index.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/fungible.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/inflation.seqtest.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/interfaces/unique/definitions.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/limits.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/nesting/collectionProperties.seqtest.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/nesting/collectionProperties.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/nesting/graphs.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/nesting/nest.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/nesting/propertyPermissions.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/nesting/tokenProperties.seqtest.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/nesting/tokenProperties.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/nesting/unnest.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/nextSponsoring.test.tsdiffbeforeafterboth
52 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);
5454
55 // Non-existing token 55 // Non-existing token
56 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 });
5858
91 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);
9393
94 // Non-existing token 94 // Non-existing token
95 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});
modifiedtests/src/refungible.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/removeCollectionAdmin.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/rpc.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/scheduler.seqtest.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/setCollectionLimits.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/setCollectionSponsor.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/setPermissions.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/transfer.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/transferFrom.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/util/globalSetup.tsdiffbeforeafterboth
20 if (!result) Promise.reject();20 if (!result) Promise.reject();
21 });21 });
2222
23 // 3. Configure App Promotion 23 // 3. Configure App Promotion
24 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');
modifiedtests/src/util/index.tsdiffbeforeafterboth
41 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 no
45 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);
modifiedtests/src/util/playgrounds/types.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/util/playgrounds/unique.dev.tsdiffbeforeafterboth
168 this.helper = helper;168 this.helper = helper;
169 }169 }
170170
171 /**171 /**
172 * Generates accounts with the specified UNQ token balance 172 * Generates accounts with the specified UNQ token balance
173 * @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 balances
175 * @returns array of newly created accounts175 * @returns array of newly created accounts
176 * @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 create
234 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 settled
235 transactions = []; //235 transactions = []; //
236 nonce = await this.helper.chain.getNonce(donor.address); // update nonce 236 nonce = await this.helper.chain.getNonce(donor.address); // update nonce
237 }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 }
404404
405 /**405 /**
406 * Wait for specified number of blocks406 * Wait for specified number of blocks
407 * @param blocksCount number of blocks to wait407 * @param blocksCount number of blocks to wait
408 * @returns 408 * @returns
409 */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-executor
modifiedtests/src/util/playgrounds/unique.tsdiffbeforeafterboth
2420 if (!event) throw Error('Cannot find transfer in events');2420 if (!event) throw Error('Cannot find transfer in events');
2421 }2421 }
24222422
2423 /**2423 /**
2424 * Get schedule for recepient of vested transfer2424 * Get schedule for recepient of vested transfer
2425 * @param address Substrate address of recipient2425 * @param address Substrate address of recipient
2426 * @returns 2426 * @returns
2427 */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) => {
modifiedtests/src/vesting.test.tsdiffbeforeafterboth

no syntactic changes

modifiedtests/src/xcm/xcmOpal.test.tsdiffbeforeafterboth
288 await helper.wait.newBlocks(3);288 await helper.wait.newBlocks(3);
289 289
290 // 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 succeeded
292 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 });
modifiedtests/src/xcm/xcmUnique.test.tsdiffbeforeafterboth

no syntactic changes