Add u8a-only strict variants (#1503)

This commit is contained in:
Jaco
2022-05-25 10:02:01 +03:00
committed by GitHub
parent 2698f6779f
commit fbf973dc2a
20 changed files with 105 additions and 37 deletions
+2 -2
View File
@@ -5,7 +5,7 @@
import type { U8aLike } from '../types';
import { u8aConcat } from './concat';
import { u8aConcatStrict } from './concat';
import { u8aEq } from './eq';
import { u8aToU8a } from './toU8a';
@@ -45,5 +45,5 @@ export function u8aWrapBytes (bytes: U8aLike): Uint8Array {
// if Ethereum-wrapping, we don't add our wrapping bytes
return u8aIsWrapped(u8a, true)
? u8a
: u8aConcat(U8A_WRAP_PREFIX, u8a, U8A_WRAP_POSTFIX);
: u8aConcatStrict([U8A_WRAP_PREFIX, u8a, U8A_WRAP_POSTFIX]);
}