@poprank/rankings
Advanced tools
Comparing version 1.1.7 to 1.1.8
@@ -159,25 +159,26 @@ "use strict"; | ||
nfts.forEach(function (nft) { | ||
// Uncommenting this in a future PR | ||
// if (ensCollectionSlugs.includes(collection as EnsCollectionSlug)) { | ||
// const max = ensCollectionSizes[collection as EnsCollectionSlug]; | ||
// const digits = max.toString().length - 1; | ||
// // Reverse engineer the number value of the ENS given its name or tokenID | ||
// let i = 0; | ||
// if (nft.name.includes('eth')) { | ||
// i = +nft.name.replace('.eth', ''); | ||
// } else { | ||
// for (i = 0; i < 10000; i++) { | ||
// const id = stringToKeccak256DecimalId(i.toString(), digits); | ||
var _a; | ||
// // Find the initial integer ID | ||
// if (id === nft.id) break; | ||
// } | ||
// } | ||
// nft.traits.push({ | ||
// value: i.toString(), | ||
// category: 'Traits', | ||
// typeValue: ID_TRAIT_TYPE, | ||
// displayType: 'number', | ||
// }); | ||
// } | ||
if (rarity_meta_1.ensCollectionSlugs.includes(collection)) { | ||
var max = rarity_meta_1.ensCollectionSizes[collection]; | ||
var digits = max.toString().length - 1; | ||
// Reverse engineer the number value of the ENS given its name or tokenID | ||
var i = 0; | ||
if (nft.name.includes('eth')) { | ||
i = +nft.name.replace('.eth', ''); | ||
} | ||
else { | ||
for (i = 0; i < 10000; i++) { | ||
var id = (0, rarity_meta_1.stringToKeccak256DecimalId)(i.toString(), digits); | ||
// Find the initial integer ID | ||
if (id === nft.id) | ||
break; | ||
} | ||
} | ||
nft.traits.push({ | ||
value: i.toString(), | ||
category: 'Traits', | ||
typeValue: rarity_meta_1.ID_TRAIT_TYPE, | ||
displayType: 'number', | ||
}); | ||
} | ||
(_a = nft.traits).push.apply(_a, (0, exports.getMetaTraits)(nft.traits, nft.collection, true)); | ||
@@ -184,0 +185,0 @@ }); |
{ | ||
"name": "@poprank/rankings", | ||
"version": "1.1.7", | ||
"version": "1.1.8", | ||
"description": "PopRank's NFT rarity and aesthetic ranking logic", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55577
768