Skip to content

Commit

Permalink
Merge branch 'dev' into optimize-pedersen
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-ziv authored Nov 14, 2023
2 parents bb41042 + d2eb73b commit 166b97b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/js/asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,8 @@ function getAssetSelector(assetDictType: string) {
Adds leading zeroes to the input hex-string to complement the expected length.
*/
function addLeadingZeroes(hexStr: string, expectedLen: number) {
let res = hexStr;
assert(res.length <= expectedLen);
while (res.length < expectedLen) {
res = '0' + res;
}
return res;
assert(hexStr.length <= expectedLen);
return hexStr.padStart(expectedLen, '0');
}

function blobToBlobHash(blob: string) {
Expand Down

0 comments on commit 166b97b

Please sign in to comment.