difftreelog
test(util) fix linting warnings
in: master
2 files changed
tests/src/util/playgrounds/unique.dev.tsdiffbeforeafterboth99101011export class SilentLogger {11export class SilentLogger {12 log(msg: any, level: any): void { }12 log(_msg: any, _level: any): void { }13 level = {13 level = {14 ERROR: 'ERROR' as const,14 ERROR: 'ERROR' as const,15 WARNING: 'WARNING' as const,15 WARNING: 'WARNING' as const,34 enable() { 34 enable() { 35 const outFn = (printer: any) => (...args: any[]) => {35 const outFn = (printer: any) => (...args: any[]) => {36 for (const arg of args) {36 for (const arg of args) {37 for (const arg of args) {38 if (typeof arg !== 'string')37 if (typeof arg !== 'string')39 continue;38 continue;40 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')39 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')41 return;40 return;42 }43 }41 }44 printer(...args);42 printer(...args);45 };43 };68 this.arrange = new ArrangeGroup(this);66 this.arrange = new ArrangeGroup(this);69 }67 }706871 async connect(wsEndpoint: string, listeners?: any): Promise<void> {69 async connect(wsEndpoint: string/*, listeners?: any*/): Promise<void> {72 const wsProvider = new WsProvider(wsEndpoint);70 const wsProvider = new WsProvider(wsEndpoint);73 this.api = new ApiPromise({71 this.api = new ApiPromise({74 provider: wsProvider,72 provider: wsProvider,133 }131 }134 }132 }135133136 await Promise.all(transactions).catch(e => {});134 await Promise.all(transactions).catch(_e => {});137 135 138 //#region TODO remove this region, when nonce problem will be solved136 //#region TODO remove this region, when nonce problem will be solved139 const checkBalances = async () => {137 const checkBalances = async () => {169 * @returns 167 * @returns 170 */168 */171 async waitNewBlocks(blocksCount = 1): Promise<void> {169 async waitNewBlocks(blocksCount = 1): Promise<void> {170 // eslint-disable-next-line no-async-promise-executor172 const promise = new Promise<void>(async (resolve) => {171 const promise = new Promise<void>(async (resolve) => {173 const unsubscribe = await this.helper.api!.rpc.chain.subscribeNewHeads(() => {172 const unsubscribe = await this.helper.api!.rpc.chain.subscribeNewHeads(() => {174 if (blocksCount > 0) {173 if (blocksCount > 0) {tests/src/util/playgrounds/unique.tsdiffbeforeafterboth--- 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;
}
}