fix: Fix promise examples minor typos in comments and variable name. Capitalise comments (#276)

This commit is contained in:
Luke Schoen
2018-10-13 08:56:27 +02:00
committed by Jaco Greeff
parent 1dd3cfce88
commit 85ebacb6de
5 changed files with 25 additions and 25 deletions
@@ -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)