Skip to content

Commit aebe56f

Browse files
shawntabrizijacogr
authored andcommitted
Update subscribeNewHeads in example (#1376)
1 parent ee7225c commit aebe56f

File tree

1 file changed

+1
-1
lines changed
  • docs/examples/promise/02_listen_to_blocks

1 file changed

+1
-1
lines changed

docs/examples/promise/02_listen_to_blocks/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ async function main () {
1616
// Subscribe to the new headers on-chain. The callback is fired when new headers
1717
// are found, the call itself returns a promise with a subscription that can be
1818
// used to unsubscribe from the newHead subscription
19-
const unsubscribe = await api.rpc.chain.subscribeNewHead((header) => {
19+
const unsubscribe = await api.rpc.chain.subscribeNewHeads((header) => {
2020
console.log(`Chain is at block: #${header.number}`);
2121

2222
if (++count === 256) {

0 commit comments

Comments
 (0)