@dynamic-labs/sdk-react-core 4.14.0 → 4.15.0
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 +22 -0
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +12 -12
- package/src/lib/utils/constants/waas/apiUrl.cjs +8 -0
- package/src/lib/utils/constants/waas/apiUrl.d.ts +1 -0
- package/src/lib/utils/constants/waas/apiUrl.js +4 -0
- package/src/lib/utils/functions/networksAndChains/networksAndChains.cjs +3 -6
- package/src/lib/utils/functions/networksAndChains/networksAndChains.js +3 -6
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.cjs +5 -3
- package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.js +5 -3
- package/src/lib/utils/hooks/useIsLoadingEmbeddedWallet/useIsLoadingEmbeddedWallet.cjs +15 -3
- package/src/lib/utils/hooks/useIsLoadingEmbeddedWallet/useIsLoadingEmbeddedWallet.js +15 -3
- package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.cjs +2 -2
- package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.15.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.14.0...v4.15.0) (2025-04-30)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add end session override for waas sui connector ([#8602](https://github.com/dynamic-labs/dynamic-auth/issues/8602)) ([6c9e6fd](https://github.com/dynamic-labs/dynamic-auth/commit/6c9e6fda4581a4e3b9e1544f22d6e5f03723d928))
|
|
8
|
+
* add presets and demo fixes ([#8609](https://github.com/dynamic-labs/dynamic-auth/issues/8609)) ([2201914](https://github.com/dynamic-labs/dynamic-auth/commit/2201914d2029ff0b67dfc2c6e696f728f32f57b3))
|
|
9
|
+
* add ShareConfig component with modal and styling ([74aff97](https://github.com/dynamic-labs/dynamic-auth/commit/74aff97689c9e7c9abc892c1deac4d748b498909))
|
|
10
|
+
* add wallet actions section and update UI components ([#8598](https://github.com/dynamic-labs/dynamic-auth/issues/8598)) ([d6170b7](https://github.com/dynamic-labs/dynamic-auth/commit/d6170b7f6abd963e6a081541e2c674b7141f1c15))
|
|
11
|
+
* dynamic waas to sign 7702 authorization ([#8603](https://github.com/dynamic-labs/dynamic-auth/issues/8603)) ([74e1722](https://github.com/dynamic-labs/dynamic-auth/commit/74e1722f417aab621f4062093e109dc45cf542ea))
|
|
12
|
+
* add signMessage feature to global wallet client ([#8563](https://github.com/dynamic-labs/dynamic-auth/issues/8563)) ([c3f9734](https://github.com/dynamic-labs/dynamic-auth/commit/c3f9734c097f5c9b88c35e0f642632f261e40fe7))
|
|
13
|
+
* allow displaying custom links in the global wallet profile dropdown menu ([#8617](https://github.com/dynamic-labs/dynamic-auth/issues/8617)) ([5fb956c](https://github.com/dynamic-labs/dynamic-auth/commit/5fb956c0c2b681fece56104b330a0e90fc8fb936))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* add default base api url for dynamic waas config on connector initialization ([#8604](https://github.com/dynamic-labs/dynamic-auth/issues/8604)) ([6218a7e](https://github.com/dynamic-labs/dynamic-auth/commit/6218a7edda4feb9028be548acfe8eff64578f0a0))
|
|
19
|
+
* enables caching for sprite.svg ([#8610](https://github.com/dynamic-labs/dynamic-auth/issues/8610)) ([decdb69](https://github.com/dynamic-labs/dynamic-auth/commit/decdb69b4df8bc2d97ee579fa423e9682ab1720b))
|
|
20
|
+
* change mobile experience to redirect ([#8003](https://github.com/dynamic-labs/dynamic-auth/issues/8003)) ([2e8a1d8](https://github.com/dynamic-labs/dynamic-auth/commit/2e8a1d8b54f54386e1abc9f4e6e5e9acf859e5fa))
|
|
21
|
+
* optimize wallet finder when performing eth and sol operations in global wallet popup ([#8564](https://github.com/dynamic-labs/dynamic-auth/issues/8564)) ([2eaf424](https://github.com/dynamic-labs/dynamic-auth/commit/2eaf4244d4aa1b1cc5c6e32574db10ab34f8ed80))
|
|
22
|
+
* loading state for v3 connect-only embedded wallet generation ([#8600](https://github.com/dynamic-labs/dynamic-auth/issues/8600)) ([af34d16](https://github.com/dynamic-labs/dynamic-auth/commit/af34d168a765aa82867116541e73c59672ab2341))
|
|
23
|
+
|
|
2
24
|
## [4.14.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.13.0...v4.14.0) (2025-04-25)
|
|
3
25
|
|
|
4
26
|
|
package/package.cjs
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var version = "4.
|
|
6
|
+
var version = "4.15.0";
|
|
7
7
|
var dependencies = {
|
|
8
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
8
|
+
"@dynamic-labs/sdk-api-core": "0.0.660",
|
|
9
9
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
10
10
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
|
11
11
|
"country-list": "2.3.0",
|
package/package.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
var version = "4.
|
|
2
|
+
var version = "4.15.0";
|
|
3
3
|
var dependencies = {
|
|
4
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
4
|
+
"@dynamic-labs/sdk-api-core": "0.0.660",
|
|
5
5
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
6
6
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
|
7
7
|
"country-list": "2.3.0",
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.15.0",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
5
|
+
"@dynamic-labs/sdk-api-core": "0.0.660",
|
|
6
6
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
7
7
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
|
8
8
|
"country-list": "2.3.0",
|
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
"yup": "0.32.11",
|
|
15
15
|
"react-international-phone": "4.2.5",
|
|
16
16
|
"bs58": "5.0.0",
|
|
17
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
18
|
-
"@dynamic-labs/iconic": "4.
|
|
19
|
-
"@dynamic-labs/logger": "4.
|
|
20
|
-
"@dynamic-labs/multi-wallet": "4.
|
|
21
|
-
"@dynamic-labs/rpc-providers": "4.
|
|
22
|
-
"@dynamic-labs/store": "4.
|
|
23
|
-
"@dynamic-labs/types": "4.
|
|
24
|
-
"@dynamic-labs/utils": "4.
|
|
25
|
-
"@dynamic-labs/wallet-book": "4.
|
|
26
|
-
"@dynamic-labs/wallet-connector-core": "4.
|
|
17
|
+
"@dynamic-labs/assert-package-version": "4.15.0",
|
|
18
|
+
"@dynamic-labs/iconic": "4.15.0",
|
|
19
|
+
"@dynamic-labs/logger": "4.15.0",
|
|
20
|
+
"@dynamic-labs/multi-wallet": "4.15.0",
|
|
21
|
+
"@dynamic-labs/rpc-providers": "4.15.0",
|
|
22
|
+
"@dynamic-labs/store": "4.15.0",
|
|
23
|
+
"@dynamic-labs/types": "4.15.0",
|
|
24
|
+
"@dynamic-labs/utils": "4.15.0",
|
|
25
|
+
"@dynamic-labs/wallet-book": "4.15.0",
|
|
26
|
+
"@dynamic-labs/wallet-connector-core": "4.15.0",
|
|
27
27
|
"eventemitter3": "5.0.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DEFAULT_WAAS_API_URL = "https://app.dynamicauth.com/api/v0";
|
|
@@ -17,7 +17,7 @@ require('../../constants/values.cjs');
|
|
|
17
17
|
require('../../../shared/consts/index.cjs');
|
|
18
18
|
|
|
19
19
|
const getNetworkInfoEntry = ({ chain, networkId, networkInfo, }) => {
|
|
20
|
-
var _a;
|
|
20
|
+
var _a, _b;
|
|
21
21
|
logger.logger.logVerboseTroubleshootingMessage('[getNetworkInfoEntry]', {
|
|
22
22
|
chain,
|
|
23
23
|
networkId,
|
|
@@ -36,11 +36,8 @@ const getNetworkInfoEntry = ({ chain, networkId, networkInfo, }) => {
|
|
|
36
36
|
networkData,
|
|
37
37
|
normalizedChain,
|
|
38
38
|
});
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
// Other networks
|
|
43
|
-
return networkData[0];
|
|
39
|
+
// Not all networks have a valid chainId, so default to the first network if the chainId is not found
|
|
40
|
+
return ((_b = networkData.find((e) => e.chainId.toString() === networkId.toString())) !== null && _b !== void 0 ? _b : networkData[0]);
|
|
44
41
|
};
|
|
45
42
|
const getEvmChainName = (chainId) => {
|
|
46
43
|
const map = {
|
|
@@ -13,7 +13,7 @@ import '../../constants/values.js';
|
|
|
13
13
|
import '../../../shared/consts/index.js';
|
|
14
14
|
|
|
15
15
|
const getNetworkInfoEntry = ({ chain, networkId, networkInfo, }) => {
|
|
16
|
-
var _a;
|
|
16
|
+
var _a, _b;
|
|
17
17
|
logger.logVerboseTroubleshootingMessage('[getNetworkInfoEntry]', {
|
|
18
18
|
chain,
|
|
19
19
|
networkId,
|
|
@@ -32,11 +32,8 @@ const getNetworkInfoEntry = ({ chain, networkId, networkInfo, }) => {
|
|
|
32
32
|
networkData,
|
|
33
33
|
normalizedChain,
|
|
34
34
|
});
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
// Other networks
|
|
39
|
-
return networkData[0];
|
|
35
|
+
// Not all networks have a valid chainId, so default to the first network if the chainId is not found
|
|
36
|
+
return ((_b = networkData.find((e) => e.chainId.toString() === networkId.toString())) !== null && _b !== void 0 ? _b : networkData[0]);
|
|
40
37
|
};
|
|
41
38
|
const getEvmChainName = (chainId) => {
|
|
42
39
|
const map = {
|
|
@@ -96,6 +96,7 @@ require('../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCa
|
|
|
96
96
|
require('../../../context/OnrampContext/OnrampContext.cjs');
|
|
97
97
|
require('../../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
|
|
98
98
|
require('../../../../index.cjs');
|
|
99
|
+
var apiUrl = require('../../constants/waas/apiUrl.cjs');
|
|
99
100
|
var constants = require('./constants.cjs');
|
|
100
101
|
require('../../../store/state/tokenBalances.cjs');
|
|
101
102
|
require('../../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
|
|
@@ -103,8 +104,9 @@ var useInternalDynamicContext = require('../../../context/DynamicContext/useDyna
|
|
|
103
104
|
|
|
104
105
|
const dynamicWaasKey = 'dynamicwaas';
|
|
105
106
|
const configWaasWalletConnector = ({ walletConnector, environmentId, apiBaseUrl, authToken, relayUrl, }) => {
|
|
107
|
+
var _a;
|
|
106
108
|
walletConnector.setEnvironmentId(environmentId);
|
|
107
|
-
walletConnector.setBaseApiUrl(apiBaseUrl === null ||
|
|
109
|
+
walletConnector.setBaseApiUrl((_a = (apiBaseUrl || apiUrl.DEFAULT_WAAS_API_URL)) === null || _a === void 0 ? void 0 : _a.replace('/api/v0', ''));
|
|
108
110
|
walletConnector.setGetAuthTokenFunction(() => authToken !== null && authToken !== void 0 ? authToken : '');
|
|
109
111
|
walletConnector.setRelayUrl(relayUrl);
|
|
110
112
|
return walletConnector;
|
|
@@ -134,7 +136,7 @@ const useDynamicWaas = () => {
|
|
|
134
136
|
if (!isCookieAuthEnabled && !authToken) {
|
|
135
137
|
return undefined;
|
|
136
138
|
}
|
|
137
|
-
if (!walletConnectorOptions.length || !environmentId
|
|
139
|
+
if (!walletConnectorOptions.length || !environmentId)
|
|
138
140
|
return undefined;
|
|
139
141
|
const walletConnector = (_a = walletConnectorOptions.find((option) => option.key.includes(dynamicWaasKey) &&
|
|
140
142
|
option.walletConnector.connectedChain === chainName)) === null || _a === void 0 ? void 0 : _a.walletConnector;
|
|
@@ -142,7 +144,7 @@ const useDynamicWaas = () => {
|
|
|
142
144
|
throw new utils.DynamicError(constants.DYNAMIC_WAAS_CONNECTOR_NOT_FOUND_ERROR);
|
|
143
145
|
}
|
|
144
146
|
const configuredWalletConnector = configWaasWalletConnector({
|
|
145
|
-
apiBaseUrl,
|
|
147
|
+
apiBaseUrl: apiBaseUrl || apiUrl.DEFAULT_WAAS_API_URL,
|
|
146
148
|
authToken,
|
|
147
149
|
environmentId,
|
|
148
150
|
relayUrl: relayUrl !== null && relayUrl !== void 0 ? relayUrl : '',
|
|
@@ -92,6 +92,7 @@ import '../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCar
|
|
|
92
92
|
import '../../../context/OnrampContext/OnrampContext.js';
|
|
93
93
|
import '../../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.js';
|
|
94
94
|
import '../../../../index.js';
|
|
95
|
+
import { DEFAULT_WAAS_API_URL } from '../../constants/waas/apiUrl.js';
|
|
95
96
|
import { DYNAMIC_WAAS_CONNECTOR_NOT_FOUND_ERROR, NO_ENABLED_CHAINS_ERROR } from './constants.js';
|
|
96
97
|
import '../../../store/state/tokenBalances.js';
|
|
97
98
|
import '../../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
|
|
@@ -99,8 +100,9 @@ import { useInternalDynamicContext } from '../../../context/DynamicContext/useDy
|
|
|
99
100
|
|
|
100
101
|
const dynamicWaasKey = 'dynamicwaas';
|
|
101
102
|
const configWaasWalletConnector = ({ walletConnector, environmentId, apiBaseUrl, authToken, relayUrl, }) => {
|
|
103
|
+
var _a;
|
|
102
104
|
walletConnector.setEnvironmentId(environmentId);
|
|
103
|
-
walletConnector.setBaseApiUrl(apiBaseUrl === null ||
|
|
105
|
+
walletConnector.setBaseApiUrl((_a = (apiBaseUrl || DEFAULT_WAAS_API_URL)) === null || _a === void 0 ? void 0 : _a.replace('/api/v0', ''));
|
|
104
106
|
walletConnector.setGetAuthTokenFunction(() => authToken !== null && authToken !== void 0 ? authToken : '');
|
|
105
107
|
walletConnector.setRelayUrl(relayUrl);
|
|
106
108
|
return walletConnector;
|
|
@@ -130,7 +132,7 @@ const useDynamicWaas = () => {
|
|
|
130
132
|
if (!isCookieAuthEnabled && !authToken) {
|
|
131
133
|
return undefined;
|
|
132
134
|
}
|
|
133
|
-
if (!walletConnectorOptions.length || !environmentId
|
|
135
|
+
if (!walletConnectorOptions.length || !environmentId)
|
|
134
136
|
return undefined;
|
|
135
137
|
const walletConnector = (_a = walletConnectorOptions.find((option) => option.key.includes(dynamicWaasKey) &&
|
|
136
138
|
option.walletConnector.connectedChain === chainName)) === null || _a === void 0 ? void 0 : _a.walletConnector;
|
|
@@ -138,7 +140,7 @@ const useDynamicWaas = () => {
|
|
|
138
140
|
throw new DynamicError(DYNAMIC_WAAS_CONNECTOR_NOT_FOUND_ERROR);
|
|
139
141
|
}
|
|
140
142
|
const configuredWalletConnector = configWaasWalletConnector({
|
|
141
|
-
apiBaseUrl,
|
|
143
|
+
apiBaseUrl: apiBaseUrl || DEFAULT_WAAS_API_URL,
|
|
142
144
|
authToken,
|
|
143
145
|
environmentId,
|
|
144
146
|
relayUrl: relayUrl !== null && relayUrl !== void 0 ? relayUrl : '',
|
|
@@ -25,6 +25,7 @@ require('../../../context/ErrorContext/ErrorContext.cjs');
|
|
|
25
25
|
require('@dynamic-labs/multi-wallet');
|
|
26
26
|
require('react-international-phone');
|
|
27
27
|
require('../../../store/state/nonce/nonce.cjs');
|
|
28
|
+
var isTurnkeyEnabled = require('../../functions/isTurnkeyEnabled/isTurnkeyEnabled.cjs');
|
|
28
29
|
var projectSettings = require('../../../store/state/projectSettings/projectSettings.cjs');
|
|
29
30
|
require('../../../config/ApiEndpoint.cjs');
|
|
30
31
|
require('../../../store/state/user/user.cjs');
|
|
@@ -102,16 +103,27 @@ const useIsLoadingEmbeddedWallet = () => {
|
|
|
102
103
|
// we only want to show the loading state if the user has no wallets at all, and is creating a waas wallet
|
|
103
104
|
// for example if they sign up with phantom wallet, we don't want to show the loading state
|
|
104
105
|
// always return false for connect-only mode, because verified credentials are not used in this mode
|
|
106
|
+
// except when user is logging in with email and will get an embedded wallet
|
|
105
107
|
const isLoadingEmbeddedWallet = React.useMemo(() => {
|
|
106
|
-
var _a;
|
|
107
|
-
if (!usingV3Wallets.usingV3Wallets(projectSettings$1)
|
|
108
|
+
var _a, _b;
|
|
109
|
+
if (!usingV3Wallets.usingV3Wallets(projectSettings$1) ||
|
|
110
|
+
!isTurnkeyEnabled.isTurnkeyEnabled(projectSettings$1)) {
|
|
108
111
|
return false;
|
|
109
112
|
}
|
|
113
|
+
const isEmailLogin = (_a = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _a === void 0 ? void 0 : _a.some((credential) => credential.format === 'email');
|
|
114
|
+
const hasWallet = (_b = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _b === void 0 ? void 0 : _b.some((credential) => credential.format === 'blockchain');
|
|
110
115
|
if (authMode === 'connect-only') {
|
|
116
|
+
if (isEmailLogin) {
|
|
117
|
+
if (hasWallet) {
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
120
|
+
return true;
|
|
121
|
+
}
|
|
122
|
+
// login with injected wallet will already have a primary wallet set so we dont need to show loading state
|
|
111
123
|
return false;
|
|
112
124
|
}
|
|
113
125
|
// If user has NO blockchain credential, then we show loading state
|
|
114
|
-
return !
|
|
126
|
+
return !hasWallet;
|
|
115
127
|
}, [projectSettings$1, user, authMode]);
|
|
116
128
|
return { isLoadingEmbeddedWallet };
|
|
117
129
|
};
|
|
@@ -21,6 +21,7 @@ import '../../../context/ErrorContext/ErrorContext.js';
|
|
|
21
21
|
import '@dynamic-labs/multi-wallet';
|
|
22
22
|
import 'react-international-phone';
|
|
23
23
|
import '../../../store/state/nonce/nonce.js';
|
|
24
|
+
import { isTurnkeyEnabled } from '../../functions/isTurnkeyEnabled/isTurnkeyEnabled.js';
|
|
24
25
|
import { getProjectSettings } from '../../../store/state/projectSettings/projectSettings.js';
|
|
25
26
|
import '../../../config/ApiEndpoint.js';
|
|
26
27
|
import '../../../store/state/user/user.js';
|
|
@@ -98,16 +99,27 @@ const useIsLoadingEmbeddedWallet = () => {
|
|
|
98
99
|
// we only want to show the loading state if the user has no wallets at all, and is creating a waas wallet
|
|
99
100
|
// for example if they sign up with phantom wallet, we don't want to show the loading state
|
|
100
101
|
// always return false for connect-only mode, because verified credentials are not used in this mode
|
|
102
|
+
// except when user is logging in with email and will get an embedded wallet
|
|
101
103
|
const isLoadingEmbeddedWallet = useMemo(() => {
|
|
102
|
-
var _a;
|
|
103
|
-
if (!usingV3Wallets(projectSettings)
|
|
104
|
+
var _a, _b;
|
|
105
|
+
if (!usingV3Wallets(projectSettings) ||
|
|
106
|
+
!isTurnkeyEnabled(projectSettings)) {
|
|
104
107
|
return false;
|
|
105
108
|
}
|
|
109
|
+
const isEmailLogin = (_a = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _a === void 0 ? void 0 : _a.some((credential) => credential.format === 'email');
|
|
110
|
+
const hasWallet = (_b = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _b === void 0 ? void 0 : _b.some((credential) => credential.format === 'blockchain');
|
|
106
111
|
if (authMode === 'connect-only') {
|
|
112
|
+
if (isEmailLogin) {
|
|
113
|
+
if (hasWallet) {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
// login with injected wallet will already have a primary wallet set so we dont need to show loading state
|
|
107
119
|
return false;
|
|
108
120
|
}
|
|
109
121
|
// If user has NO blockchain credential, then we show loading state
|
|
110
|
-
return !
|
|
122
|
+
return !hasWallet;
|
|
111
123
|
}, [projectSettings, user, authMode]);
|
|
112
124
|
return { isLoadingEmbeddedWallet };
|
|
113
125
|
};
|
|
@@ -94,10 +94,10 @@ require('../../../context/OnrampContext/OnrampContext.cjs');
|
|
|
94
94
|
require('../../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
|
|
95
95
|
require('../../../../index.cjs');
|
|
96
96
|
var useDynamicWaas = require('../useDynamicWaas/useDynamicWaas.cjs');
|
|
97
|
+
var apiUrl = require('../../constants/waas/apiUrl.cjs');
|
|
97
98
|
require('../../../store/state/tokenBalances.cjs');
|
|
98
99
|
require('../../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
|
|
99
100
|
|
|
100
|
-
const DEFAULT_API_BASE_URL = 'https://app.dynamicauth.com/api/v0';
|
|
101
101
|
const useSetWalletConnectorFetchers = (walletOptions, environmentId, projectSettings) => {
|
|
102
102
|
const apiBaseUrl = dynamicContextProps.useApiBaseUrl();
|
|
103
103
|
const authToken = getAuthToken.getAuthToken();
|
|
@@ -112,7 +112,7 @@ const useSetWalletConnectorFetchers = (walletOptions, environmentId, projectSett
|
|
|
112
112
|
}
|
|
113
113
|
else if (walletConnectorCore.isDynamicWaasConnector(walletOption.walletConnector)) {
|
|
114
114
|
useDynamicWaas.configWaasWalletConnector({
|
|
115
|
-
apiBaseUrl: apiBaseUrl !== null && apiBaseUrl !== void 0 ? apiBaseUrl :
|
|
115
|
+
apiBaseUrl: apiBaseUrl !== null && apiBaseUrl !== void 0 ? apiBaseUrl : apiUrl.DEFAULT_WAAS_API_URL,
|
|
116
116
|
authToken,
|
|
117
117
|
environmentId,
|
|
118
118
|
relayUrl: (_e = (_d = (_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _c === void 0 ? void 0 : _c.waas) === null || _d === void 0 ? void 0 : _d.relayUrl) !== null && _e !== void 0 ? _e : '',
|
|
@@ -90,10 +90,10 @@ import '../../../context/OnrampContext/OnrampContext.js';
|
|
|
90
90
|
import '../../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.js';
|
|
91
91
|
import '../../../../index.js';
|
|
92
92
|
import { configWaasWalletConnector } from '../useDynamicWaas/useDynamicWaas.js';
|
|
93
|
+
import { DEFAULT_WAAS_API_URL } from '../../constants/waas/apiUrl.js';
|
|
93
94
|
import '../../../store/state/tokenBalances.js';
|
|
94
95
|
import '../../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
|
|
95
96
|
|
|
96
|
-
const DEFAULT_API_BASE_URL = 'https://app.dynamicauth.com/api/v0';
|
|
97
97
|
const useSetWalletConnectorFetchers = (walletOptions, environmentId, projectSettings) => {
|
|
98
98
|
const apiBaseUrl = useApiBaseUrl();
|
|
99
99
|
const authToken = getAuthToken();
|
|
@@ -108,7 +108,7 @@ const useSetWalletConnectorFetchers = (walletOptions, environmentId, projectSett
|
|
|
108
108
|
}
|
|
109
109
|
else if (isDynamicWaasConnector(walletOption.walletConnector)) {
|
|
110
110
|
configWaasWalletConnector({
|
|
111
|
-
apiBaseUrl: apiBaseUrl !== null && apiBaseUrl !== void 0 ? apiBaseUrl :
|
|
111
|
+
apiBaseUrl: apiBaseUrl !== null && apiBaseUrl !== void 0 ? apiBaseUrl : DEFAULT_WAAS_API_URL,
|
|
112
112
|
authToken,
|
|
113
113
|
environmentId,
|
|
114
114
|
relayUrl: (_e = (_d = (_c = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _c === void 0 ? void 0 : _c.waas) === null || _d === void 0 ? void 0 : _d.relayUrl) !== null && _e !== void 0 ? _e : '',
|