Minor readability improvements (#952)

* Minor readability improvements

* trigger

* Additional

* Additional
This commit is contained in:
Jaco
2021-04-21 10:31:28 +02:00
committed by GitHub
parent 1de30914c2
commit 3a98323e8b
14 changed files with 52 additions and 70 deletions
+2 -4
View File
@@ -45,10 +45,8 @@ export function compactToU8a (_value: BN | BigInt | number): Uint8Array {
assert(length >= 4, 'Previous tests match anyting less than 2^30; qed');
return u8aConcat(
new Uint8Array([
// substract 4 as minimum (also catered for in decoding)
((length - 4) << 2) + 0b11
]),
// subtract 4 as minimum (also catered for in decoding)
[((length - 4) << 2) + 0b11],
u8a.subarray(0, length)
);
}