Add missing cookbook .keys

This commit is contained in:
Jaco Greeff
2020-04-16 13:21:04 +02:00
committed by GitHub
parent 933c8d48e2
commit 7aac4c7936
+1 -1
View File
@@ -50,7 +50,7 @@ While we can retrieve only the keys for a specific era, using a argument for the
```js
// Retrieves the keys for the slashed validators in era 652
const slashedKeys = await api.query.staking.nominatorSlashInEra(652);
const slashedKeys = await api.query.staking.nominatorSlashInEra.keys(652);
// key still contains (era, nominatorId) decoded, so args[1]
console.log(`slashed: ${slashedKeys.map((k) => k.args[1].toString())`);