fix: need to prefix the key type byte

This commit is contained in:
Derrick Hammer 2023-09-03 00:56:34 -04:00
parent 90bd870eb2
commit cabb498ac0
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 0 deletions

View File

@ -115,6 +115,8 @@ async function handleGetRegistryEntry(aq: ActiveQuery) {
pubkey = ensureBytes("registry entry ", pubkey, 32);
pubkey = concatBytes(Uint8Array.from([CID_HASH_TYPES.ED25519]), pubkey);
const ret = await node.services.registry.get(pubkey);
if (!ret) {
@ -124,6 +126,7 @@ async function handleGetRegistryEntry(aq: ActiveQuery) {
aq.respond(ret);
}
async function handleSetRegistryEntry(aq: ActiveQuery) {
for (const field of ["key", "data", "revision"]) {
if (!(field in aq.callerInput)) {