From b9a6763cb25cb062c6f49b586bd63b031e340c0e Mon Sep 17 00:00:00 2001 From: chrlschwb Date: Fri, 8 Sep 2023 15:11:25 +0200 Subject: [PATCH] update --- tests/network-tests/src/Api.ts | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/tests/network-tests/src/Api.ts b/tests/network-tests/src/Api.ts index 5ef27811e5..c766d9463c 100644 --- a/tests/network-tests/src/Api.ts +++ b/tests/network-tests/src/Api.ts @@ -124,10 +124,7 @@ export class ApiFactory { constructor(api: ApiPromise, treasuryAccountUri: string, miniSecret: string) { this.api = api - this.keyring = new Keyring({ - type: 'sr25519', - ss58Format: JOYSTREAM_ADDRESS_PREFIX, - }) + this.keyring = new Keyring({ type: 'sr25519', ss58Format: JOYSTREAM_ADDRESS_PREFIX }) this.treasuryAccount = this.keyring.addFromUri(treasuryAccountUri).address this.miniSecret = miniSecret this.addressesToKeyId = new Map() @@ -430,13 +427,7 @@ export class Api { public treasuryTransferBalanceToAccounts(destinations: string[], amount: BN): Promise { return Promise.all( - destinations.map((account) => - this.transferBalance({ - from: this.treasuryAccount, - to: account, - amount, - }) - ) + destinations.map((account) => this.transferBalance({ from: this.treasuryAccount, to: account, amount })) ) } @@ -699,10 +690,10 @@ export class Api { const { announcingPeriodDuration, idlePeriodDuration } = this.consts.council const { voteStageDuration, revealStageDuration } = this.consts.referendum const durationByStage = { - Announcing: announcingPeriodDuration, - Voting: voteStageDuration, - Revealing: revealStageDuration, - Idle: idlePeriodDuration, + 'Announcing': announcingPeriodDuration, + 'Voting': voteStageDuration, + 'Revealing': revealStageDuration, + 'Idle': idlePeriodDuration, } as const const currentStageEndsIn = currentStageStartedAt.add(durationByStage[currentStage]).sub(currentBlock) @@ -944,9 +935,7 @@ export class Api { ) { return this.sender.signAndSend( this.api.tx.storage.updateStorageBucketsForBag( - createType('PalletStorageBagIdType', { - Dynamic: { Channel: Number(channelId) }, - }), + createType('PalletStorageBagIdType', { Dynamic: { Channel: Number(channelId) } }), createType( 'BTreeSet', addStorageBuckets.map((item) => item)