From 87e814de09cc175ccc32c91da350bf296486edac Mon Sep 17 00:00:00 2001 From: tarikgul Date: Wed, 18 Sep 2024 09:48:28 -0400 Subject: [PATCH] Cleanup nits --- packages/api-cli/src/runcli.ts | 6 +++--- packages/json-serve/src/runcli.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/api-cli/src/runcli.ts b/packages/api-cli/src/runcli.ts index 5288621f9..5a7efce94 100644 --- a/packages/api-cli/src/runcli.ts +++ b/packages/api-cli/src/runcli.ts @@ -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); } diff --git a/packages/json-serve/src/runcli.ts b/packages/json-serve/src/runcli.ts index ee1326930..0072f1f5a 100644 --- a/packages/json-serve/src/runcli.ts +++ b/packages/json-serve/src/runcli.ts @@ -115,7 +115,7 @@ async function main (): Promise { 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); }