Bump dev (incl. lint fixes) (#579)

* Bump dev (incl. lint fixes)

* Fix failures
This commit is contained in:
Jaco Greeff
2020-04-01 21:20:50 +02:00
committed by GitHub
parent 6429cc307c
commit cbec4add88
24 changed files with 374 additions and 283 deletions
+2 -2
View File
@@ -46,8 +46,8 @@ describe('bnToBn', (): void => {
it('converts Compact to BN', (): void => {
expect(
bnToBn({
toBn: (): BN => new BN(1234),
something: 'test'
something: 'test',
toBn: (): BN => new BN(1234)
}).toNumber()
).toEqual(1234);
});
+2 -2
View File
@@ -45,13 +45,13 @@ describe('bnToU8a', (): void => {
it('converts negative numbers (BE)', (): void => {
expect(
bnToU8a(new BN(-1234), { isNegative: true, isLe: false })
bnToU8a(new BN(-1234), { isLe: false, isNegative: true })
).toEqual(new Uint8Array([251, 46]));
});
it('converts negative numbers (bitLength)', (): void => {
expect(
bnToU8a(new BN(-1234), { isNegative: true, bitLength: 32 })
bnToU8a(new BN(-1234), { bitLength: 32, isNegative: true })
).toEqual(new Uint8Array([46, 251, 255, 255]));
});
+1 -1
View File
@@ -30,9 +30,9 @@ function bnToU8a (value: BN | BigInt | number | null, options?: Options): Uint8A
function bnToU8a (value: BN | BigInt | number | null, bitLength?: number, isLe?: boolean): Uint8Array;
function bnToU8a (value: BN | BigInt | number | null, arg1: number | Options = { bitLength: -1, isLe: true, isNegative: false }, arg2?: boolean): Uint8Array {
const _options: Options = {
bitLength: -1,
isLe: true,
isNegative: false,
bitLength: -1,
...isNumber(arg1) ? { bitLength: arg1, isLe: arg2 } : arg1
};