Skip to content

Commit

Permalink
improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
RomarQ committed Dec 11, 2024
1 parent 3cbe366 commit 23aa74c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
6 changes: 1 addition & 5 deletions test/helpers/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,6 @@ export const MAX_ETH_POV_PER_TX = 3_250_000n;
type ConstantStoreType = (typeof RUNTIME_CONSTANTS)["MOONBASE"];

export function ConstantStore(context: GenericContext): ConstantStoreType {
const runtimeChain = context.polkadotJs().consts.system.version.specName.toUpperCase();
const runtime = runtimeChain
.split(" ")
.filter((v) => Object.keys(RUNTIME_CONSTANTS).includes(v))
.join();
const runtime = context.polkadotJs().consts.system.version.specName.toUpperCase();
return RUNTIME_CONSTANTS[runtime];
}
8 changes: 1 addition & 7 deletions test/suites/lazy-loading/test-runtime-upgrade.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import "@moonbeam-network/api-augment";
import { beforeAll, describeSuite, expect } from "@moonwall/cli";
import { RUNTIME_CONSTANTS } from "../../helpers";
import { ApiPromise } from "@polkadot/api";
import fs from "fs/promises";
import { u8aToHex } from "@polkadot/util";
Expand All @@ -24,12 +23,7 @@ describeSuite({
beforeAll(async () => {
api = context.polkadotJs();

const runtimeChain = api.consts.system.version.specName.toUpperCase();
const runtime = runtimeChain
.split(" ")
.filter((v) => Object.keys(RUNTIME_CONSTANTS).includes(v))
.join()
.toLowerCase();
const runtime = api.consts.system.version.specName.toLowerCase();
const wasmPath = `../target/release/wbuild/${runtime}-runtime/${runtime}_runtime.compact.compressed.wasm`; // editorconfig-checker-disable-line

const runtimeWasmHex = u8aToHex(await fs.readFile(wasmPath));
Expand Down

0 comments on commit 23aa74c

Please sign in to comment.