Fix entries values decoding (#2011)
* Fix entries values decoding * Linting * Properly unwrap storage subs
This commit is contained in:
@@ -5,12 +5,21 @@
|
||||
import { ApiPromise, WsProvider } from '@polkadot/api';
|
||||
|
||||
describe.skip('misc quick tests', (): void => {
|
||||
it.skip('handles doublemap entries', async (): Promise<void> => {
|
||||
const api = await new ApiPromise().isReady;
|
||||
const activeEra = await api.query.staking.activeEra();
|
||||
|
||||
console.log(JSON.stringify(
|
||||
await api.query.staking.erasStakers.entries(activeEra.unwrapOrDefault().index)
|
||||
));
|
||||
});
|
||||
|
||||
it.skip('does something in society', async (): Promise<void> => {
|
||||
const provider = new WsProvider('wss://kusama-rpc.polkadot.io');
|
||||
const api = await new ApiPromise({ provider }).isReady;
|
||||
|
||||
console.error(api.query.society.defenderVotes.creator.meta.toHuman());
|
||||
|
||||
await api.query.society.defenderVotes('Dab4bfYTZRUDMWjYAUQuFbDreQ9mt7nULWu3Dw7jodbzVe9');
|
||||
console.log(JSON.stringify(
|
||||
await api.query.society.defenderVotes('Dab4bfYTZRUDMWjYAUQuFbDreQ9mt7nULWu3Dw7jodbzVe9')
|
||||
));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user