We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b38123f commit e15a800Copy full SHA for e15a800
src/index.ts
@@ -478,13 +478,11 @@ const executeCommand = async (
478
.action(async (epoch: number) => {
479
if (!ipfsNode) return callback(responses.IPFS_NOT_STARTED);
480
481
- const cid_ = await client.query.runtime.Pki.documents.get(
482
- Field.from(epoch),
483
- );
484
- if (!cid_) return callback(responses.RECORD_NOT_FOUND);
+ const doc = await qry.processor.getPkiDocument(epoch);
+ if (!doc) return callback(responses.RECORD_NOT_FOUND);
485
486
// get data from IPFS by cid
487
- const cid = cid_.toString();
+ const cid = doc.cid;
488
const data = await ipfsNode.getBytes(cid);
489
490
const debug = { epoch, cid };
0 commit comments