fix: Fix promise examples minor typos in comments and variable name. Capitalise comments (#276)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
// Import the ApiPromise
|
||||
// Import the API
|
||||
const { ApiPromise } = require('@polkadot/api');
|
||||
|
||||
// Our address for Alice on the dev chain
|
||||
const Alice = '5GoKvZWG5ZPYL1WUovuHW3zJBWBP5eT8CbqjdRY4Q6iMaDtZ';
|
||||
|
||||
async function main () {
|
||||
// Create out API with a default connection to the local node
|
||||
// Create our API with a default connection to the local node
|
||||
const api = await ApiPromise.create();
|
||||
|
||||
// Make our basic chain state/storage queries, all in one go
|
||||
@@ -18,7 +18,7 @@ async function main () {
|
||||
console.log(`accountNonce(${Alice}) ${accountNonce}`);
|
||||
console.log(`blockPeriod ${blockPeriod.toNumber()} seconds`);
|
||||
|
||||
// get the balances for all validators
|
||||
// Retrieve the balances for all validators
|
||||
const validatorBalances = await Promise.all(
|
||||
validators.map((authorityId) =>
|
||||
api.query.balances.freeBalance(authorityId)
|
||||
|
||||
Reference in New Issue
Block a user