fixup ss import
This commit is contained in:
parent
75ba4dd349
commit
94778d711c
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue