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:
@@ -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}`);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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() //
|
||||
|
||||
Reference in New Issue
Block a user