Update docs for system.account (#1944)

This commit is contained in:
Jaco Greeff
2020-02-25 17:01:41 +01:00
committed by GitHub
parent 67841a9212
commit c17f93a3ec
14 changed files with 24 additions and 24 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ const ADDR = '5DTestUPts3kjeXSTMyerHihn1uwMfLj8vU8sqF7qYrFabHE';
const now = await api.query.timestamp.now();
// Retrieve the account balance & nonce via the system module
const [nonce, balance] = await api.query.system.account(ADDR);
const { nonce, data: balance } = await api.query.system.account(ADDR);
console.log(`${now}: balance of ${balance.free} and a nonce of ${nonce}`);
```
@@ -27,7 +27,7 @@ There have been some additions in the code above comparing with retrieving runti
```js
...
// Retrieve last block timestamp, account nonce & balances
const [now, [nonce, balances]] = await Promise.all([
const [now, { nonce, data: balances }] = await Promise.all([
api.query.timestamp.now(),
api.query.system.account(ADDR)
]);