Bump dev (incl. lint fixes) (#579)
* Bump dev (incl. lint fixes) * Fix failures
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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]));
|
||||
});
|
||||
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user