+2
-2
@@ -22,8 +22,8 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.5.5",
|
||||
"@polkadot/dev": "^0.31.0-beta.3",
|
||||
"@polkadot/ts": "^0.1.64",
|
||||
"@polkadot/dev": "^0.31.0-beta.4",
|
||||
"@polkadot/ts": "^0.1.68",
|
||||
"gh-pages": "^2.1.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ type DecodeResult = PairInfo & {
|
||||
};
|
||||
|
||||
export default function decode (passphrase?: string, _encrypted?: Uint8Array | null): DecodeResult {
|
||||
assert(_encrypted, `No encrypted data available to decode`);
|
||||
assert(_encrypted, 'No encrypted data available to decode');
|
||||
|
||||
const encrypted = (_encrypted as Uint8Array);
|
||||
const encoded = passphrase
|
||||
@@ -26,7 +26,7 @@ export default function decode (passphrase?: string, _encrypted?: Uint8Array | n
|
||||
) as Uint8Array)
|
||||
: encrypted;
|
||||
|
||||
assert(encoded, `Unable to unencrypt using the supplied passphrase`);
|
||||
assert(encoded, 'Unable to unencrypt using the supplied passphrase');
|
||||
|
||||
const header = encoded.subarray(0, PKCS8_HEADER.length);
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ describe('snapshots', (): void => {
|
||||
trie.put(toU8a('doge'), toU8a('coin'));
|
||||
trie.del(toU8a('doge'));
|
||||
|
||||
trie.snapshot(back, (): undefined => void 0);
|
||||
trie.snapshot(back, (): void => {});
|
||||
|
||||
expect(u8aToHex(back.getRoot())).toEqual(u8aToHex(root));
|
||||
expect(back.get(values[0].k)).toEqual(values[0].v);
|
||||
@@ -48,7 +48,7 @@ describe('snapshots', (): void => {
|
||||
values.forEach(({ k, v }): void => {
|
||||
trie.put(k, v);
|
||||
});
|
||||
trie.snapshot(back, (): undefined => void 0);
|
||||
trie.snapshot(back, (): void => {});
|
||||
|
||||
expect(u8aToHex(back.getRoot())).toEqual(u8aToHex(root));
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ export function getNodeType (node: Node): NodeType {
|
||||
return NodeType.BRANCH;
|
||||
}
|
||||
|
||||
throw new Error(`Unable to determine node type`);
|
||||
throw new Error('Unable to determine node type');
|
||||
}
|
||||
|
||||
export function decodeNode (codec: Codec, encoded: Uint8Array | Node): Node {
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"@polkadot/util": "^1.2.0-beta.1",
|
||||
"@polkadot/wasm-crypto": "^0.13.1",
|
||||
"@polkadot/wasm-crypto": "^0.14.0-beta.0",
|
||||
"@types/bip39": "^2.4.2",
|
||||
"@types/bs58": "^4.0.0",
|
||||
"@types/pbkdf2": "^3.0.0",
|
||||
|
||||
@@ -7,13 +7,13 @@ import { arrayFilter } from '.';
|
||||
describe('filterArray', (): void => {
|
||||
it('filters arrays, removing undefined', (): void => {
|
||||
expect(
|
||||
arrayFilter([0, '', null, false, void 0, NaN])
|
||||
arrayFilter([0, '', null, false, undefined, NaN])
|
||||
).toEqual([0, '', null, false, NaN]);
|
||||
});
|
||||
|
||||
it('filters arrays, removing undefined & null (allowNull = false)', (): void => {
|
||||
expect(
|
||||
arrayFilter([0, '', null, false, void 0, NaN], false)
|
||||
arrayFilter([0, '', null, false, undefined, NaN], false)
|
||||
).toEqual([0, '', false, NaN]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -44,7 +44,7 @@ describe('isJsonObject', (): void => {
|
||||
|
||||
it('returns false on invalid JSON', (): void => {
|
||||
expect(
|
||||
isJsonObject(`{"abc", "def"}`)
|
||||
isJsonObject('{"abc", "def"}')
|
||||
).toEqual(false);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -147,7 +147,7 @@ describe('logger', (): void => {
|
||||
|
||||
it('does not debug log when no process.env', (): void => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
process.env = void 0 as any;
|
||||
process.env = undefined as any;
|
||||
|
||||
l = logger('test');
|
||||
l.debug('test');
|
||||
|
||||
Reference in New Issue
Block a user