Skip to content

Commit 08423a1

Browse files
committed
fix: clarify wording for watchEntries
1 parent b73cb9a commit 08423a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/pages/typed/queries.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ typedApi.query.Pallet.Query.getEntries(arg1, arg2, { at: "0x12345678" }) // 2/3
8181
`getEntries` returns as well the key arguments for every entry found. There are some storage entries whose arguments cannot be inferred directly from the key, because the arguments are hashed to compute the key. Therefore, only in these cases, `keyArgs` will be the `key` instead of the arguments themselves. The type will be `OpaqueKeyHash`.
8282
:::
8383
84-
`watchEntries` allows you to watch changes to all entries of a storage map. As in `getEntries`, you can optionally provide a subset of the keys and/or `{at: "best"}` to watch changes to the best block, instead of the default `"finalized"` block. An event will be emitted for every new block, containing:
84+
`watchEntries` allows you to watch changes to all entries of a storage map. As in `getEntries`, you can optionally provide a subset of the keys and/or `{at: "best"}` to watch changes to the best block, instead of the default `"finalized"` block. Events will be emitted disregarding if there were (or not) changes to the entries. There is no guarantee that an event will be emitted for every block. The events will contain:
8585
8686
- `block`: Block hash, block number, and parent block hash; to identify how updated the information is.
87-
- `deltas`: In case there were any changes since previous event, `upserted` (meaning added or changed) and `deleted` entries. If `deltas` is `null`, then no changes happened during that block.
87+
- `deltas`: In case there were any changes since previous event, `upserted` (meaning added or changed) and `deleted` entries. If `deltas` were to be `null`, then no changes happened since the last emission.
8888
- `entries`: Immutable data-structure with the whole bunch of entries, updated to that block.

0 commit comments

Comments
 (0)