From 841e453a8cbc1ef809e0a2d9eccc64c3ee9aaa4e Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 8 Sep 2023 06:59:05 -0400 Subject: [PATCH] fix: use toRegistryEntry of CID --- src/appDb.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/appDb.ts b/src/appDb.ts index 768ae87..aef6f81 100644 --- a/src/appDb.ts +++ b/src/appDb.ts @@ -9,7 +9,6 @@ import { import { deriveBlakeChildKey, deriveBlakeChildKeyInt } from "#keys.js"; import { uploadObject } from "#upload.js"; import { signRegistryEntry } from "@lumeweb/libs5/lib/service/registry.js"; -import { encodeRegistryValue } from "#cid.js"; import { downloadSmallObject } from "#download.js"; import { readableStreamToUint8Array } from "binconv"; import { utf8ToBytes } from "@noble/hashes/utils"; @@ -74,11 +73,10 @@ export default class AppDb { const cid = await uploadObject(cipherText); const writeKey = deriveBlakeChildKeyInt(pathKey, writeKeyDerivationTweak); const keyPair = createKeyPair(writeKey); - const registryVal = encodeRegistryValue(cid); const sre = await signRegistryEntry({ kp: keyPair, - data: registryVal, + data: cid.toRegistryEntry(), revision, });