Skip to content

Commit

Permalink
Upgrade polkadot-js/common and polkadot-js/api to 13.1.1 (#562)
Browse files Browse the repository at this point in the history
* Upgrade polkadot-js deps

* Cleanup nits
  • Loading branch information
TarikGul authored Sep 18, 2024
1 parent 8550199 commit cea426f
Show file tree
Hide file tree
Showing 9 changed files with 200 additions and 69 deletions.
12 changes: 6 additions & 6 deletions packages/api-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
"polkadot-js-api": "./runcli.mjs"
},
"dependencies": {
"@polkadot/api": "^12.4.1",
"@polkadot/api-augment": "^12.4.1",
"@polkadot/keyring": "^13.0.2",
"@polkadot/types": "^12.4.1",
"@polkadot/util": "^13.0.2",
"@polkadot/util-crypto": "^13.0.2",
"@polkadot/api": "^13.1.1",
"@polkadot/api-augment": "^13.1.1",
"@polkadot/keyring": "^13.1.1",
"@polkadot/types": "^13.1.1",
"@polkadot/util": "^13.1.1",
"@polkadot/util-crypto": "^13.1.1",
"tslib": "^2.7.0",
"yargs": "^17.7.2"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/api-cli/src/runcli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,13 @@ async function makeTx ({ api, fn, log }: CallInfo): Promise<(() => void) | Hash>
let signable;

if (sudo || sudoUncheckedWeight) {
const adminId = await api.query.sudo.key();
const adminId = await api.query['sudo']['key']();

assert(adminId.eq(signer.address), 'Supplied seed does not match on-chain sudo key');

signable = sudoUncheckedWeight
? api.tx.sudo.sudoUncheckedWeight(fn(...params), sudoUncheckedWeight)
: api.tx.sudo.sudo(fn(...params));
? api.tx['sudo']['sudoUncheckedWeight'](fn(...params), sudoUncheckedWeight)
: api.tx['sudo']['sudo'](fn(...params));
} else {
signable = fn(...params);
}
Expand Down
10 changes: 5 additions & 5 deletions packages/json-serve/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
"polkadot-js-json-serve": "./runcli.mjs"
},
"dependencies": {
"@polkadot/api": "^12.4.1",
"@polkadot/api-augment": "^12.4.1",
"@polkadot/api-derive": "^12.4.1",
"@polkadot/types": "^12.4.1",
"@polkadot/util": "^13.0.2",
"@polkadot/api": "^13.1.1",
"@polkadot/api-augment": "^13.1.1",
"@polkadot/api-derive": "^13.1.1",
"@polkadot/types": "^13.1.1",
"@polkadot/util": "^13.1.1",
"koa": "^2.14.2",
"koa-route": "^3.2.0",
"tslib": "^2.7.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/json-serve/src/runcli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ async function main (): Promise<void> {
tokenDecimals = chainProperties.tokenDecimals.unwrapOr([new BN(12)])[0].toNumber();

await api.rpc.chain.subscribeNewHeads(onNewHead);
await api.query.balances.totalIssuance(onTotalInsurance);
await api.query['balances']['totalIssuance'](onTotalInsurance);
await api.derive.staking.electedInfo(undefined, undefined, onElectedInfo);
}

Expand Down
8 changes: 4 additions & 4 deletions packages/metadata-cmp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
"polkadot-js-metadata-cmp": "./runcli.mjs"
},
"dependencies": {
"@polkadot/api": "^12.4.1",
"@polkadot/keyring": "^13.0.2",
"@polkadot/types": "^12.4.1",
"@polkadot/util": "^13.0.2",
"@polkadot/api": "^13.1.1",
"@polkadot/keyring": "^13.1.1",
"@polkadot/types": "^13.1.1",
"@polkadot/util": "^13.1.1",
"tslib": "^2.7.0",
"yargs": "^17.7.2"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/monitor-rpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"polkadot-js-monitor": "./runcli.mjs"
},
"dependencies": {
"@polkadot/api": "^12.4.1",
"@polkadot/types": "^12.4.1",
"@polkadot/util": "^13.0.2",
"@polkadot/api": "^13.1.1",
"@polkadot/types": "^13.1.1",
"@polkadot/util": "^13.1.1",
"koa": "^2.14.2",
"koa-route": "^3.2.0",
"tslib": "^2.7.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/signer-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
"polkadot-js-signer": "./runcli.mjs"
},
"dependencies": {
"@polkadot/api": "^12.4.1",
"@polkadot/api": "^13.1.1",
"@polkadot/api-cli": "^0.57.5-1-x",
"@polkadot/keyring": "^13.0.2",
"@polkadot/types": "^12.4.1",
"@polkadot/util": "^13.0.2",
"@polkadot/util-crypto": "^13.0.2",
"@polkadot/keyring": "^13.1.1",
"@polkadot/types": "^13.1.1",
"@polkadot/util": "^13.1.1",
"@polkadot/util-crypto": "^13.1.1",
"tslib": "^2.7.0",
"yargs": "^17.7.2"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/vanitygen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"polkadot-js-vanitygen": "./runcli.mjs"
},
"dependencies": {
"@polkadot/util": "^13.0.2",
"@polkadot/util-crypto": "^13.0.2",
"@polkadot/util": "^13.1.1",
"@polkadot/util-crypto": "^13.1.1",
"tslib": "^2.7.0",
"yargs": "^17.7.2"
},
Expand Down
Loading

0 comments on commit cea426f

Please sign in to comment.