Skip to content

Commit

Permalink
Merge pull request #84 from Itheum/develop
Browse files Browse the repository at this point in the history
2.5.0, MVX libs updated to handle axios issue, new getOwners method, owner attr for DataNft, use BigNumber defaults
  • Loading branch information
newbreedofgeek authored Dec 20, 2023
2 parents 536c9f3 + 007983e commit 658f1de
Show file tree
Hide file tree
Showing 12 changed files with 217 additions and 123 deletions.
133 changes: 98 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@itheum/sdk-mx-data-nft",
"version": "2.4.1",
"version": "2.5.0",
"description": "SDK for Itheum's Data NFT Technology on MultiversX Blockchain",
"main": "out/index.js",
"types": "out/index.d.js",
Expand All @@ -16,18 +16,18 @@
"author": "Itheum Protocol",
"license": "GPL-3.0-only",
"dependencies": {
"@multiversx/sdk-core": "12.11.0",
"@multiversx/sdk-network-providers": "2.0.0",
"@multiversx/sdk-core": "12.17.0",
"@multiversx/sdk-network-providers": "2.2.0",
"bignumber.js": "9.1.2",
"nft.storage": "7.1.1"
},
"devDependencies": {
"@types/jest": "29.5.4",
"@types/jest": "29.5.11",
"jest": "29.7.0",
"ts-jest": "29.1.1",
"tslint": "6.1.3",
"typedoc": "0.25.1",
"typescript": "5.2.2"
"typedoc": "0.25.4",
"typescript": "5.3.3"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/common/mint-utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NFTStorage, File } from 'nft.storage';
import { File, NFTStorage } from 'nft.storage';

export async function dataNFTDataStreamAdvertise(
dataNFTStreamUrl: string,
Expand Down
5 changes: 3 additions & 2 deletions src/common/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import BigNumber from 'bignumber.js';
import { DataNft } from '../datanft';
import { NftEnumType, NftType, Offer } from '../interfaces';
import { ErrFetch, ErrMissingTrait, ErrMissingValueForTrait } from '../errors';
import { NftEnumType, NftType, Offer } from '../interfaces';

export function numberToPaddedHex(value: BigNumber.Value) {
let hex = new BigNumber(value).toString(16);
Expand Down Expand Up @@ -56,6 +56,7 @@ export function parseDataNft(value: NftType): DataNft {
nonce: value.nonce,
collection: value.collection,
balance: value.balance ? Number(value.balance) : 0,
owner: value.owner ? value.owner : '',
...DataNft.decodeAttributes(value.attributes)
});
}
Expand Down Expand Up @@ -362,7 +363,7 @@ export function validateSpecificParamsMint(params: {
datasetDescription?: string | undefined;
royalties?: number | undefined;
supply?: number | undefined;
antiSpamTax?: number | undefined;
antiSpamTax?: BigNumber.Value | undefined;
_mandatoryParamsList: string[]; // a pure JS fallback way to validate mandatory params, as typescript rules for mandatory can be bypassed by client app
}): {
allPassed: boolean;
Expand Down
Loading

0 comments on commit 658f1de

Please sign in to comment.