Return sessionIds & nextSessionIds in staking.info (#1272)

* Return sessionIds & nextSessionIds in staking.info

* Simplify
This commit is contained in:
Jaco Greeff
2019-08-06 16:34:11 +02:00
committed by GitHub
parent 55cc2625c8
commit 724c4b8263
3 changed files with 26 additions and 17 deletions
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { Header } from '@polkadot/types/interfaces';
import { Header, Keys } from '@polkadot/types/interfaces';
import testingPairs from '@polkadot/keyring/testingPairs';
import WsProvider from '@polkadot/rpc-provider/ws';
@@ -106,15 +106,15 @@ describeE2E({
console.error('*** query.session.nextKeys');
const result = JSON.stringify(
await api.query.session.nextKeys(
(await api.query.session.nextKeys<Keys>(
api.consts.session.dedupKeyPrefix,
keyring.bob.address
)
)).toArray()
);
console.error(result, { ed25519, sr25519 });
console.error(result, [ed25519, sr25519]);
expect(result).toEqual(JSON.stringify({ ed25519, sr25519 }));
expect(result).toEqual(JSON.stringify([ed25519, sr25519]));
done();
}