From 419c7f85a8bd22e8ee10839bc30ea1248e2b6f3a Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 1 Sep 2023 21:48:17 -0400 Subject: [PATCH] fix: convert binary string to uint8array --- src/service/registry.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/service/registry.ts b/src/service/registry.ts index cf47997..e96a743 100644 --- a/src/service/registry.ts +++ b/src/service/registry.ts @@ -15,6 +15,7 @@ import { Buffer } from "buffer"; import { EventEmitter } from "events"; import KeyPairEd25519 from "#ed25519.js"; import { S5Node, stringifyBytes } from "#node.js"; +import { utf8ToBytes } from "@noble/hashes/utils"; export class RegistryService { private db?: AbstractSublevel< @@ -200,7 +201,7 @@ export class RegistryService { } catch {} if (val) { - return this.deserializeRegistryEntry(val); + return this.deserializeRegistryEntry(utf8ToBytes(val)); } return null;