Skip to content

Commit

Permalink
Minor gov fixes (#401)
Browse files Browse the repository at this point in the history
* fix

* changeset

* fmt
  • Loading branch information
timbrinded authored Mar 22, 2024
1 parent 2bfb556 commit 7151436
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 19 deletions.
5 changes: 5 additions & 0 deletions .changeset/wise-kangaroos-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@moonwall/cli": patch
---

minor fix
7 changes: 1 addition & 6 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,7 @@
"node": ">=20",
"pnpm": ">=7"
},
"files": [
"dist",
"bin",
"*.d.ts",
"*.mjs"
],
"files": ["dist", "bin", "*.d.ts", "*.mjs"],
"scripts": {
"clean": "rm -rf dist && rm -rf node_modules",
"build": "pnpm exec rm -rf dist && tsup src --format esm --no-splitting --sourcemap && pnpm generate-types",
Expand Down
5 changes: 4 additions & 1 deletion packages/cli/src/lib/governanceProcedures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import type {
PalletReferendaReferendumInfo,
} from "@polkadot/types/lookup";
import { blake2AsHex } from "@polkadot/util-crypto";
import { u8aToBigInt, u8aToNumber } from "@polkadot/util";

export const COUNCIL_MEMBERS: KeyringPair[] = [baltathar, charleth, dorothy];
export const COUNCIL_THRESHOLD = Math.ceil((COUNCIL_MEMBERS.length * 2) / 3);
Expand Down Expand Up @@ -706,7 +707,9 @@ export const fastFowardToNextEvent = async (context: DevModeContext) => {
if (key.isEmpty) {
throw new Error("No items in scheduler.agenda");
}
const desiredHeight = Number(key.toHuman());
const decodedKey: object = key.toHuman() as any;

const desiredHeight = Number((decodedKey[0].valueOf() as string).replaceAll(",", ""));
const currentHeight = (await context.pjsApi.rpc.chain.getHeader()).number.toNumber();

console.log(
Expand Down
7 changes: 1 addition & 6 deletions packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,7 @@
"node": ">=20",
"pnpm": ">=7"
},
"files": [
"dist",
"bin",
"*.d.ts",
"*.mjs"
],
"files": ["dist", "bin", "*.d.ts", "*.mjs"],
"scripts": {
"clean": "rm -rf dist && rm -rf node_modules",
"build": "rm -rf dist && tsup src --format esm --no-splitting --sourcemap && pnpm generate-types",
Expand Down
7 changes: 1 addition & 6 deletions packages/util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,7 @@
"node": ">=20",
"pnpm": ">=7"
},
"files": [
"dist",
"bin",
"*.d.ts",
"*.mjs"
],
"files": ["dist", "bin", "*.d.ts", "*.mjs"],
"scripts": {
"clean": "rm -rf dist && rm -rf node_modules",
"build": "pnpm exec rm -rf dist && tsup src --format esm --no-splitting --sourcemap && pnpm generate-types",
Expand Down

0 comments on commit 7151436

Please sign in to comment.