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

@nftx/core

Package Overview
Dependencies
Maintainers
2
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nftx/core - npm Package Compare versions

Comparing version 0.10.0 to 0.10.1

2

package.json
{
"name": "@nftx/core",
"version": "0.10.0",
"version": "0.10.1",
"description": "",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/NFTX-project/nftxjs",

@@ -5,3 +5,3 @@ import { BigNumber } from '@ethersproject/bignumber';

import type { Asset } from '@nftx/types';
import { getChainConstant } from '@nftx/utils';
import { addressEqual, getChainConstant } from '@nftx/utils';
import { processAssetItems } from '../utils';

@@ -87,9 +87,13 @@

items:
data?.account?.holdings?.map((x) => {
const assetAddress = x.token.collection.id;
const tokenId = BigNumber.from(x.token.identifier).toString();
const quantity = BigNumber.from(x.balance);
data?.account?.holdings
?.filter((x) =>
assetAddresses.some((y) => addressEqual(x.token.collection.id, y))
)
.map((x) => {
const assetAddress = x.token.collection.id;
const tokenId = BigNumber.from(x.token.identifier).toString();
const quantity = BigNumber.from(x.balance);
return { assetAddress, tokenId, quantity };
}) ?? [],
return { assetAddress, tokenId, quantity };
}) ?? [],
});

@@ -96,0 +100,0 @@

import { gql, querySubgraph } from '@nftx/subgraph';
import config from '@nftx/config';
import { getChainConstant } from '@nftx/utils';
import { addressEqual, getChainConstant } from '@nftx/utils';
import type { Asset } from '@nftx/types';

@@ -68,6 +68,10 @@ import { processAssetItems } from '../utils';

network,
items: data.tokens.map((x) => ({
assetAddress: x.collection.id,
tokenId: x.identifier,
})),
items: data.tokens
.filter((x) =>
assetAddresses.some((y) => addressEqual(x.collection.id, y))
)
.map((x) => ({
assetAddress: x.collection.id,
tokenId: x.identifier,
})),
});

@@ -74,0 +78,0 @@ }

import { BigNumber } from '@ethersproject/bignumber';
import { gql, querySubgraph } from '@nftx/subgraph';
import config from '@nftx/config';
import { getChainConstant } from '@nftx/utils';
import { addressEqual, getChainConstant } from '@nftx/utils';
import type { Asset } from '@nftx/types';

@@ -83,7 +83,11 @@ import { processAssetItems } from '../utils';

items:
data?.account?.tokens?.map((x) => {
const [assetAddress] = x.id.split('-');
const tokenId = BigNumber.from(x.identifier).toString();
return { assetAddress, tokenId };
}) ?? [],
data?.account?.tokens
?.map((x) => {
const [assetAddress] = x.id.split('-');
const tokenId = BigNumber.from(x.identifier).toString();
return { assetAddress, tokenId };
})
.filter((x) =>
assetAddresses.some((y) => addressEqual(x.assetAddress, y))
) ?? [],
});

@@ -90,0 +94,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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