@dynamic-labs/sdk-react-core 2.6.0 → 2.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,6 @@
1
1
 
2
+ ### [2.6.1](https://github.com/dynamic-labs/DynamicAuth/compare/v2.6.0...v2.6.1) (2024-09-11)
3
+
2
4
  ## [2.6.0](https://github.com/dynamic-labs/DynamicAuth/compare/v2.5.3...v2.6.0) (2024-09-03)
3
5
 
4
6
 
package/package.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "2.6.0";
6
+ var version = "2.6.1";
7
7
  var dependencies = {
8
8
  "@dynamic-labs/sdk-api-core": "0.0.510",
9
9
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client'
2
- var version = "2.6.0";
2
+ var version = "2.6.1";
3
3
  var dependencies = {
4
4
  "@dynamic-labs/sdk-api-core": "0.0.510",
5
5
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "2.6.0",
3
+ "version": "2.6.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
@@ -17,18 +17,18 @@
17
17
  "react-i18next": "13.5.0",
18
18
  "yup": "0.32.11",
19
19
  "react-international-phone": "4.2.5",
20
- "@dynamic-labs/iconic": "2.6.0",
21
- "@dynamic-labs/logger": "2.6.0",
22
- "@dynamic-labs/multi-wallet": "2.6.0",
23
- "@dynamic-labs/rpc-provider-ethereum": "2.6.0",
24
- "@dynamic-labs/rpc-provider-solana": "2.6.0",
25
- "@dynamic-labs/rpc-providers": "2.6.0",
26
- "@dynamic-labs/store": "2.6.0",
27
- "@dynamic-labs/types": "2.6.0",
28
- "@dynamic-labs/utils": "2.6.0",
29
- "@dynamic-labs/viem-utils": "2.6.0",
30
- "@dynamic-labs/wallet-book": "2.6.0",
31
- "@dynamic-labs/wallet-connector-core": "2.6.0",
20
+ "@dynamic-labs/iconic": "2.6.1",
21
+ "@dynamic-labs/logger": "2.6.1",
22
+ "@dynamic-labs/multi-wallet": "2.6.1",
23
+ "@dynamic-labs/rpc-provider-ethereum": "2.6.1",
24
+ "@dynamic-labs/rpc-provider-solana": "2.6.1",
25
+ "@dynamic-labs/rpc-providers": "2.6.1",
26
+ "@dynamic-labs/store": "2.6.1",
27
+ "@dynamic-labs/types": "2.6.1",
28
+ "@dynamic-labs/utils": "2.6.1",
29
+ "@dynamic-labs/viem-utils": "2.6.1",
30
+ "@dynamic-labs/wallet-book": "2.6.1",
31
+ "@dynamic-labs/wallet-connector-core": "2.6.1",
32
32
  "eventemitter3": "5.0.1"
33
33
  },
34
34
  "devDependencies": {
@@ -7,35 +7,21 @@ var sdkApiCore = require('@dynamic-labs/sdk-api-core');
7
7
  class ApiEndpoint {
8
8
  }
9
9
  ApiEndpoint.getBaseUrl = () => {
10
- if (!ApiEndpoint.__defined__) {
10
+ if (!ApiEndpoint.__baseUrl__) {
11
11
  throw new Error('ApiEndpoint Base URL has not been initialized');
12
12
  }
13
13
  return ApiEndpoint.__baseUrl__;
14
14
  };
15
15
  ApiEndpoint.setBaseUrl = (baseUrlInput) => {
16
- if (!ApiEndpoint.__defined__) {
17
- if (!baseUrlInput) {
18
- /**
19
- * If the baseUrl is not provided, use the default baseUrl from the sdk-api package
20
- */
21
- ApiEndpoint.__baseUrl__ = new sdkApiCore.Configuration().basePath;
22
- }
23
- else {
24
- ApiEndpoint.__baseUrl__ = baseUrlInput;
25
- }
26
- ApiEndpoint.__defined__ = true;
27
- }
28
- else if (!baseUrlInput && ApiEndpoint.__defined__) {
16
+ if (!baseUrlInput) {
29
17
  /**
30
- * If for some reason (usually in local development), the setBaseUrl is called multiple times with undefined
31
- * And we already have it defined, let's just assume it's a no-op
18
+ * If the baseUrl is not provided, use the default baseUrl from the sdk-api package
32
19
  */
33
- return;
20
+ ApiEndpoint.__baseUrl__ = new sdkApiCore.Configuration().basePath;
34
21
  }
35
- else if (ApiEndpoint.__baseUrl__ !== baseUrlInput) {
36
- throw new Error(`ApiEndpoint baseUrl is already set to ${ApiEndpoint.__baseUrl__}, cannot change it to ${baseUrlInput}`);
22
+ else {
23
+ ApiEndpoint.__baseUrl__ = baseUrlInput;
37
24
  }
38
- Object.freeze(ApiEndpoint);
39
25
  };
40
26
 
41
27
  module.exports = ApiEndpoint;
@@ -1,7 +1,6 @@
1
1
  declare class ApiEndpoint {
2
2
  private static __baseUrl__;
3
- private static __defined__;
4
- static getBaseUrl: () => string | undefined;
3
+ static getBaseUrl: () => string;
5
4
  static setBaseUrl: (baseUrlInput?: string) => void;
6
5
  }
7
6
  export default ApiEndpoint;
@@ -5,35 +5,21 @@ import { Configuration } from '@dynamic-labs/sdk-api-core';
5
5
  class ApiEndpoint {
6
6
  }
7
7
  ApiEndpoint.getBaseUrl = () => {
8
- if (!ApiEndpoint.__defined__) {
8
+ if (!ApiEndpoint.__baseUrl__) {
9
9
  throw new Error('ApiEndpoint Base URL has not been initialized');
10
10
  }
11
11
  return ApiEndpoint.__baseUrl__;
12
12
  };
13
13
  ApiEndpoint.setBaseUrl = (baseUrlInput) => {
14
- if (!ApiEndpoint.__defined__) {
15
- if (!baseUrlInput) {
16
- /**
17
- * If the baseUrl is not provided, use the default baseUrl from the sdk-api package
18
- */
19
- ApiEndpoint.__baseUrl__ = new Configuration().basePath;
20
- }
21
- else {
22
- ApiEndpoint.__baseUrl__ = baseUrlInput;
23
- }
24
- ApiEndpoint.__defined__ = true;
25
- }
26
- else if (!baseUrlInput && ApiEndpoint.__defined__) {
14
+ if (!baseUrlInput) {
27
15
  /**
28
- * If for some reason (usually in local development), the setBaseUrl is called multiple times with undefined
29
- * And we already have it defined, let's just assume it's a no-op
16
+ * If the baseUrl is not provided, use the default baseUrl from the sdk-api package
30
17
  */
31
- return;
18
+ ApiEndpoint.__baseUrl__ = new Configuration().basePath;
32
19
  }
33
- else if (ApiEndpoint.__baseUrl__ !== baseUrlInput) {
34
- throw new Error(`ApiEndpoint baseUrl is already set to ${ApiEndpoint.__baseUrl__}, cannot change it to ${baseUrlInput}`);
20
+ else {
21
+ ApiEndpoint.__baseUrl__ = baseUrlInput;
35
22
  }
36
- Object.freeze(ApiEndpoint);
37
23
  };
38
24
 
39
25
  export { ApiEndpoint as default };