fix bigint type (#1079)
This commit is contained in:
@@ -21,7 +21,7 @@ const MAX_U32 = new BN(2).pow(new BN(32 - 2)).subn(1);
|
||||
* console.log(compactToU8a(511, 32)); // Uint8Array([0b11111101, 0b00000111])
|
||||
* ```
|
||||
*/
|
||||
export function compactToU8a (_value: BN | BigInt | number): Uint8Array {
|
||||
export function compactToU8a (_value: BN | bigint | number): Uint8Array {
|
||||
const value = bnToBn(_value);
|
||||
|
||||
if (value.lte(MAX_U8)) {
|
||||
|
||||
Reference in New Issue
Block a user