fix: cid is a CID instance already
This commit is contained in:
parent
eeb8e35bf9
commit
5227acb287
|
@ -107,7 +107,7 @@ maybeInitDefaultPortals();
|
|||
|
||||
const fd = await fs.open(file as string);
|
||||
|
||||
let cid;
|
||||
let cid: CID;
|
||||
|
||||
try {
|
||||
cid = await uploadObject(
|
||||
|
@ -178,7 +178,7 @@ await peerDefer.promise;
|
|||
|
||||
let newEntry;
|
||||
try {
|
||||
newEntry = CID.decode(cid).toRegistryEntry();
|
||||
newEntry = cid.toRegistryEntry();
|
||||
} catch (e) {
|
||||
console.error("Failed to publish: ", e.message);
|
||||
process.exit();
|
||||
|
|
Loading…
Reference in New Issue