Bump deps (#74)

* Bump deps

* Expose options with isDevelopment
This commit is contained in:
Jaco Greeff
2019-02-15 11:13:34 +01:00
committed by GitHub
parent 177d0093ea
commit 46a8dad405
7 changed files with 40 additions and 35 deletions
+3 -2
View File
@@ -3,8 +3,9 @@
// of the Apache-2.0 license. See the LICENSE file for details.
import { Prefix } from '@polkadot/keyring/address/types';
import { KeyringInstance, KeyringPair, KeyringOptions } from '@polkadot/keyring/types';
import { KeyringInstance, KeyringPair } from '@polkadot/keyring/types';
import { AddressSubject } from './observable/types';
import { KeyringOptions } from './types';
import testKeyring from '@polkadot/keyring/testing';
import { isBoolean, isString } from '@polkadot/util';
@@ -82,7 +83,7 @@ export default class Base {
env.set(isDevelopment);
}
protected initKeyring (options: KeyringOptions & { isDevelopment?: boolean }): void {
protected initKeyring (options: KeyringOptions): void {
const keyring = testKeyring({ addressPrefix: this._prefix, ...options });
if (isBoolean(options.isDevelopment)) {
+2 -2
View File
@@ -2,9 +2,9 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { KeyringPair, KeyringPair$Meta, KeyringPair$Json, KeyringOptions } from '@polkadot/keyring/types';
import { KeyringPair, KeyringPair$Meta, KeyringPair$Json } from '@polkadot/keyring/types';
import { SingleAddress } from './observable/types';
import { KeyringAddress, KeyringJson, KeyringJson$Meta, KeyringStruct } from './types';
import { KeyringAddress, KeyringJson, KeyringJson$Meta, KeyringOptions, KeyringStruct } from './types';
import store from 'store';
import createPair from '@polkadot/keyring/pair';
@@ -8,11 +8,11 @@ describe('KeyringOption', () => {
it('should not allow initOptions to be called more than once', () => {
const state = {};
// first call
keyringOptionInstance.init(state);
keyringOptionInstance.init(state as any);
// second call
expect(() => {
keyringOptionInstance.init(state);
keyringOptionInstance.init(state as any);
}).toThrowError('Unable to initialise options more than once');
});
});
+5 -1
View File
@@ -2,9 +2,13 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { KeyringInstance as BaseKeyringInstance, KeyringPair, KeyringPair$Meta, KeyringPair$Json, KeyringOptions } from '@polkadot/keyring/types';
import { KeyringInstance as BaseKeyringInstance, KeyringPair, KeyringPair$Meta, KeyringPair$Json, KeyringOptions as KeyringOptionsBase } from '@polkadot/keyring/types';
import { AddressSubject, SingleAddress } from './observable/types';
export type KeyringOptions = KeyringOptionsBase & {
isDevelopment?: boolean
};
export type KeyringJson$Meta = {
isRecent?: boolean,
isTesting?: boolean,