--- a/tests/src/util/playgrounds/unique.dev.ts +++ b/tests/src/util/playgrounds/unique.dev.ts @@ -9,7 +9,7 @@ export class SilentLogger { - log(msg: any, level: any): void { } + log(_msg: any, _level: any): void { } level = { ERROR: 'ERROR' as const, WARNING: 'WARNING' as const, @@ -34,12 +34,10 @@ enable() { const outFn = (printer: any) => (...args: any[]) => { for (const arg of args) { - for (const arg of args) { - if (typeof arg !== 'string') - continue; - if (arg.includes('1000:: Normal connection closure') || arg.includes('Not decorating unknown runtime apis: UniqueApi/2, RmrkApi/1') || arg.includes('RPC methods not decorated:') || arg === 'Normal connection closure') - return; - } + if (typeof arg !== 'string') + continue; + if (arg.includes('1000:: Normal connection closure') || arg.includes('Not decorating unknown runtime apis: UniqueApi/2, RmrkApi/1') || arg.includes('RPC methods not decorated:') || arg === 'Normal connection closure') + return; } printer(...args); }; @@ -68,7 +66,7 @@ this.arrange = new ArrangeGroup(this); } - async connect(wsEndpoint: string, listeners?: any): Promise { + async connect(wsEndpoint: string/*, listeners?: any*/): Promise { const wsProvider = new WsProvider(wsEndpoint); this.api = new ApiPromise({ provider: wsProvider, @@ -133,7 +131,7 @@ } } - await Promise.all(transactions).catch(e => {}); + await Promise.all(transactions).catch(_e => {}); //#region TODO remove this region, when nonce problem will be solved const checkBalances = async () => { @@ -162,13 +160,14 @@ return accounts; }; - + /** * Wait for specified bnumber of blocks * @param blocksCount number of blocks to wait * @returns */ async waitNewBlocks(blocksCount = 1): Promise { + // eslint-disable-next-line no-async-promise-executor const promise = new Promise(async (resolve) => { const unsubscribe = await this.helper.api!.rpc.chain.subscribeNewHeads(() => { if (blocksCount > 0) { --- a/tests/src/util/playgrounds/unique.ts +++ b/tests/src/util/playgrounds/unique.ts @@ -317,6 +317,7 @@ if(options !== null) return transaction.signAndSend(sender, options, callback); return transaction.signAndSend(sender, callback); }; + // eslint-disable-next-line no-async-promise-executor return new Promise(async (resolve, reject) => { try { const unsub = await sign((result: any) => { @@ -1100,11 +1101,11 @@ return this.getCollectionObject(this.helper.util.extractCollectionIdFromCreationResult(creationResult, errorLabel)); } - getCollectionObject(collectionId: number): any { + getCollectionObject(_collectionId: number): any { return null; } - getTokenObject(collectionId: number, tokenId: number): any { + getTokenObject(_collectionId: number, _tokenId: number): any { return null; } }