This commit is contained in:
Riordan Panayides 2021-05-22 13:57:53 +01:00
parent 85e674385e
commit 86788e2943
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ const pubkeyMapper = {
// support strings that can be contained in at most 32 bytes // support strings that can be contained in at most 32 bytes
const str32Mapper = { const str32Mapper = {
encode: (str: String) => { encode: (str: string) => {
str = str.substr(0, 32).padEnd(32) str = str.substr(0, 32).padEnd(32)
return Buffer.from(str, "utf8").slice(0, 32) // truncate at 32 bytes return Buffer.from(str, "utf8").slice(0, 32) // truncate at 32 bytes
}, },