Update examples for 0.90 (#1225)

* Update examples for 0.90

* Fix number typo

* Adapth to use timestamp.now (blockPeriod now in all versions)
This commit is contained in:
Jaco Greeff
2019-07-29 20:19:52 +02:00
committed by GitHub
parent a322fad2e9
commit 9dd0c6cfd8
6 changed files with 11 additions and 9 deletions
@@ -13,7 +13,7 @@ async function main () {
api.rpc.chain.subscribeNewHead()
))
.subscribe((header) => {
console.log(`Chain is at block: #${header.blockNumber}`);
console.log(`Chain is at block: #${header.number}`);
});
}
+1 -1
View File
@@ -12,7 +12,7 @@ async function main () {
api.rpc.chain.subscribeNewHead()
))
.subscribe((header) => {
console.log(`Chain is at block: #${header.blockNumber}`);
console.log(`Chain is at block: #${header.number}`);
});
// In this example we're calling the Overvables unsubscribe() //