From be12ad2dda1c7058d8fb53dba8b63bc6fc17464e Mon Sep 17 00:00:00 2001 From: Daniel Shiposha Date: Thu, 13 Oct 2022 07:57:21 +0000 Subject: [PATCH] fix: don't enable testutils if not exist --- --- a/tests/src/util/playgrounds/unique.dev.ts +++ b/tests/src/util/playgrounds/unique.dev.ts @@ -11,6 +11,7 @@ import {ICrossAccountId, TSigner} from './types'; import {FrameSystemEventRecord} from '@polkadot/types/lookup'; import {VoidFn} from '@polkadot/api/types'; +import {Pallets} from '.'; export class SilentLogger { log(_msg: any, _level: any): void { } @@ -487,6 +488,10 @@ } async enable() { + if (this.helper.fetchMissingPalletNames([Pallets.TestUtils]).length != 0) { + return; + } + const signer = this.helper.util.fromSeed('//Alice'); await this.helper.getSudo().executeExtrinsic(signer, 'api.tx.testUtils.enable', [], true); } -- gitstuff