Skip to content

Commit

Permalink
Ensure resolutions are correct for pjs/common and pjs/api (#565)
Browse files Browse the repository at this point in the history
* Ensure resolutions are correct for pjs

* lint
  • Loading branch information
TarikGul authored Sep 18, 2024
1 parent 8fb27ff commit f88194f
Show file tree
Hide file tree
Showing 4 changed files with 144 additions and 275 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@
"@types/yargs": "^17.0.32"
},
"resolutions": {
"@polkadot/api": "^12.4.1",
"@polkadot/api-derive": "^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-derive": "^13.1.1",
"@polkadot/keyring": "^13.1.1",
"@polkadot/types": "^13.1.1",
"@polkadot/util": "^13.1.1",
"@polkadot/util-crypto": "^13.1.1",
"typescript": "^5.5.4"
}
}
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
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
Loading

0 comments on commit f88194f

Please sign in to comment.