Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@poprank/rankings

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@poprank/rankings - npm Package Compare versions

Comparing version 1.1.7 to 1.1.8

45

lib/rarity/rarity.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc