Skip to content

Commit

Permalink
chore: add debug
Browse files Browse the repository at this point in the history
  • Loading branch information
newbreedofgeek committed Nov 11, 2024
1 parent 753990e commit c0ec35c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 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.8.0-alpha.5",
"version": "3.8.0-alpha.6",
"description": "SDK for Itheum's Data NFT Technology on MultiversX Blockchain",
"main": "out/index.js",
"types": "out/index.d.js",
Expand Down
13 changes: 6 additions & 7 deletions src/datanft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class DataNft implements DataNftType {
/**
* Sets the network configuration for the DataNft class.
* @param env 'devnet' | 'mainnet' | 'testnet'
* @param useSpecificApiEndpoint optional param to use a specific RPC API endpoint for the env, if not given, defaults to config default value. Value need to start with https://
* @param useSpecificApiEndpoint optional param to use a specific RPC API endpoint for the env, if not given, defaults to config default value.
*/
static setNetworkConfig(env: string, useSpecificApiEndpoint?: string) {
if (!(env in EnvironmentsEnum)) {
Expand All @@ -107,15 +107,14 @@ export class DataNft implements DataNftType {
);
}
this.env = env;
this.networkConfiguration = networkConfiguration[env as EnvironmentsEnum];
this.apiConfiguration = apiConfiguration[env as EnvironmentsEnum];

if (
useSpecificApiEndpoint &&
useSpecificApiEndpoint.trim().includes('https://')
) {
debugger;
if (useSpecificApiEndpoint && useSpecificApiEndpoint.trim() !== '') {
this.apiConfiguration = useSpecificApiEndpoint.trim();
this.networkConfiguration.networkProvider = useSpecificApiEndpoint.trim();
} else {
this.networkConfiguration = networkConfiguration[env as EnvironmentsEnum];
this.apiConfiguration = apiConfiguration[env as EnvironmentsEnum];
}

console.log(
Expand Down

0 comments on commit c0ec35c

Please sign in to comment.