Skip to content

Commit

Permalink
bump js api for gov2 support (#30)
Browse files Browse the repository at this point in the history
* bump js api for gov2 support

* change type of refCount to unbreak vote bot
  • Loading branch information
nicolasochem authored Dec 21, 2022
1 parent 230dfd3 commit d76579e
Show file tree
Hide file tree
Showing 3 changed files with 613 additions and 669 deletions.
4 changes: 2 additions & 2 deletions polkadot-votebot-cron/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async function main() {
const DEADLINE_WARNING_NUM_BLOCKS: BigInt = BigInt(15000);

console.log("Polkadot Vote Bot by MIDL.dev");
console.log("Copyright 2022 MIDLDEV OU");
console.log("Copyright 2023 MIDLDEV OU");
console.log("***");
console.log(`Chain: ${chain}`);
console.log(`Current block number: ${currentBlockNum.toHuman()}`);
Expand All @@ -83,7 +83,7 @@ async function main() {
let refCount = await api.query.democracy.referendumCount();
var referenda: any = [];
let ongoingRefs = [];
let i: number = refCount.toU8a()[0];
let i: number = refCount.toNumber();
if (i) {
while (true) {
i = i - 1;
Expand Down
Loading

0 comments on commit d76579e

Please sign in to comment.