From 6ca971af28d8d9e59571a5707463c9450ec35f6c Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Fri, 16 Sep 2022 16:30:50 +0000 Subject: [PATCH] test: return missing generateKeyringPair --- --- a/tests/src/util/helpers.ts +++ b/tests/src/util/helpers.ts @@ -1853,6 +1853,11 @@ itApi.only = (name: string, cb: (apis: { api: ApiPromise, privateKeyWrapper: (account: string) => IKeyringPair }) => any) => itApi(name, cb, {only: true}); itApi.skip = (name: string, cb: (apis: { api: ApiPromise, privateKeyWrapper: (account: string) => IKeyringPair }) => any) => itApi(name, cb, {skip: true}); +let accountSeed = 10000; +export function generateKeyringPair(keyring: Keyring) { + const privateKey = `0xDEADBEEF${(Date.now() + (accountSeed++)).toString(16)}`.padStart(64, '0'); + return keyring.addFromUri(privateKey); +} export async function expectSubstrateEventsAtBlock(api: ApiPromise, blockNumber: AnyNumber | BlockNumber, section: string, methods: string[], dryRun = false) { const blockHash = await api.rpc.chain.getBlockHash(blockNumber); -- gitstuff