Skip to content

Commit

Permalink
Merge branch 'main' into d-david
Browse files Browse the repository at this point in the history
  • Loading branch information
bucurdavid committed Apr 22, 2024
2 parents f8c4b52 + e9ba21f commit 238396e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@itheum/sdk-mx-data-nft",
"version": "3.1.0",
"version": "3.2.1",
"description": "SDK for Itheum's Data NFT Technology on MultiversX Blockchain",
"main": "out/index.js",
"types": "out/index.d.js",
Expand Down
9 changes: 5 additions & 4 deletions src/common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ export function parseDataNft(value: NftType): DataNft {
value.uris
?.slice(2)
.map((uri) => Buffer.from(uri, 'base64').toString('ascii')) ?? [],
media: value.media,
...attributes
};
return new DataNft(returnValue);
Expand Down Expand Up @@ -366,12 +367,12 @@ export function validateSpecificParamsViewData(params: {
typeof params.fwdHeaderKeys === 'string' &&
params.fwdHeaderKeys.trim() !== '' &&
params.fwdHeaderKeys.split(',').length > 0 &&
params.fwdHeaderKeys.split(',').length < 5
params.fwdHeaderKeys.split(',').length < 10
) {
fwdHeaderKeysIsValid = true;
} else {
validationMessages +=
'[fwdHeaderKeys needs to be a comma separated lowercase string with less than 5 items]';
'[fwdHeaderKeys needs to be a comma separated lowercase string with less than 10 items]';
}
}

Expand All @@ -390,7 +391,7 @@ export function validateSpecificParamsViewData(params: {
.call(params.fwdHeaderMapLookup)
.includes('Object') &&
Object.keys(params.fwdHeaderMapLookup).length > 0 &&
Object.keys(params.fwdHeaderMapLookup).length < 5
Object.keys(params.fwdHeaderMapLookup).length < 10
) {
if (!params._fwdHeaderMapLookupMustContainBearerAuthHeader) {
fwdHeaderMapLookupIsValid = true;
Expand All @@ -412,7 +413,7 @@ export function validateSpecificParamsViewData(params: {
}
} else {
validationMessages +=
'[fwdHeaderMapLookup needs to be a object map with maximum 5 items]';
'[fwdHeaderMapLookup needs to be a object map with maximum 10 items]';
}
}

Expand Down
1 change: 1 addition & 0 deletions src/datanft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export class DataNft implements DataNftType {
readonly overrideDataMarshalChainId: string = '';
readonly isDataNFTPH: boolean = false;
readonly extraAssets: string[] = [];
readonly media: object[] = [];

static networkConfiguration: Config;
static apiConfiguration: string;
Expand Down

0 comments on commit 238396e

Please sign in to comment.