Add keyring default to ed25519 (#314)

This commit is contained in:
Jaco Greeff
2019-02-15 17:18:09 +01:00
committed by GitHub
parent 2a76b1b807
commit ca376a2d10
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ export default class Keyring implements KeyringInstance {
private _pairs: Pairs;
private _type: KeyringPairType;
constructor (options: KeyringOptions) {
constructor (options: KeyringOptions = { type: 'ed25519' }) {
assert(options && ['ed25519', 'sr25519'].includes(options.type || 'undefined'), `Expected a keyring type of either 'ed25519' or 'sr25519', found '${options.type}`);
this._pairs = new Pairs();
+1 -1
View File
@@ -38,7 +38,7 @@ const SEEDS: { [index: string ]: Uint8Array } = {
* @description The test accounts (i.e. alice, bob, dave, eve, ferdie)
* are available on the dev chain and each test account is initialised with DOT funds.
*/
export default function testKeyring (options: KeyringOptions): KeyringInstance {
export default function testKeyring (options?: KeyringOptions): KeyringInstance {
const keyring = new Keyring(options);
Object
+1 -1
View File
@@ -11,7 +11,7 @@ type TestKeyringMap = {
[index: string]: KeyringPair
};
export default function testKeyringPairs (options: KeyringOptions): TestKeyringMap {
export default function testKeyringPairs (options?: KeyringOptions): TestKeyringMap {
const keyring = createKeyring(options);
const pairs = keyring.getPairs();