fixup ss import

This commit is contained in:
Ladd Hoffman 2024-05-20 16:31:04 -05:00
parent 75ba4dd349
commit 94778d711c
1 changed files with 3 additions and 3 deletions

View File

@ -135,10 +135,10 @@ const addPostWithRetry = async (authors, hash, references, retryDelay = 5000) =>
const importPaper = async (paper) => {
console.log('references count:', paper.references.length);
const { paperId } = paper;
const references = paper.references.filter((x) => !!x.paperId);
const eachReferenceWeightPPM = Math.floor(PPM_TO_REFERENCES / references.length);
const paperReferences = paper.references.filter((x) => !!x.paperId);
const eachReferenceWeightPPM = Math.floor(PPM_TO_REFERENCES / paperReferences.length);
const references = (await Promise.mapSeries(
references,
paperReferences,
async (citedPaper) => {
// We need to fetch this paper so we can generate the post we WOULD add to the forum.
// That way, if we later add the cited paper to the blockchain it will have the correct hash.