@dynamic-labs/sdk-react-core 3.0.0-alpha.63 → 3.0.0-alpha.65
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 +14 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +11 -11
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +4 -1
- package/src/lib/components/NetworkPicker/NetworkPicker.js +4 -1
- package/src/lib/config/ApiEndpoint.cjs +6 -20
- package/src/lib/config/ApiEndpoint.d.ts +1 -2
- package/src/lib/config/ApiEndpoint.js +6 -20
- package/src/lib/store/state/networkConfigurations/networkConfigurations.cjs +2 -1
- package/src/lib/store/state/networkConfigurations/networkConfigurations.js +2 -1
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +14 -1
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +2 -0
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +15 -2
- package/src/lib/utils/hooks/useFetchNonce/useFetchNonce.cjs +1 -0
- package/src/lib/utils/hooks/useFetchNonce/useFetchNonce.js +1 -0
- package/src/lib/utils/hooks/usePromise/usePromise.cjs +34 -60
- package/src/lib/utils/hooks/usePromise/usePromise.d.ts +3 -10
- package/src/lib/utils/hooks/usePromise/usePromise.js +35 -61
- package/src/lib/utils/hooks/usePromise/usePromise.types.d.ts +24 -7
- package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/resolveFetcher.cjs +1 -0
- package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/resolveFetcher.d.ts +1 -1
- package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/resolveFetcher.js +1 -0
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +0 -1
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +0 -1
- package/src/lib/views/MfaVerificationView/MfaVerificationView.cjs +1 -0
- package/src/lib/views/MfaVerificationView/MfaVerificationView.js +1 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +1 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +1 -1
- package/src/lib/utils/hooks/usePromise/utils/createReducer/createReducer.cjs +0 -19
- package/src/lib/utils/hooks/usePromise/utils/createReducer/createReducer.js +0 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
|
|
2
|
+
## [3.0.0-alpha.65](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.64...v3.0.0-alpha.65) (2024-09-11)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* gracefully handle errors when trying to find solana tx destination ([#6847](https://github.com/dynamic-labs/DynamicAuth/issues/6847)) ([19359ad](https://github.com/dynamic-labs/DynamicAuth/commit/19359ad40b16af0edb822d1fc6643fecdbc89adf))
|
|
8
|
+
|
|
9
|
+
## [3.0.0-alpha.64](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.63...v3.0.0-alpha.64) (2024-09-10)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* add solana ledger check for connect-only ([#6833](https://github.com/dynamic-labs/DynamicAuth/issues/6833)) ([4829122](https://github.com/dynamic-labs/DynamicAuth/commit/4829122bbd1e04b9b02f8686df5dd5a6d2ae6c1c))
|
|
15
|
+
|
|
2
16
|
## [3.0.0-alpha.63](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.62...v3.0.0-alpha.63) (2024-09-10)
|
|
3
17
|
|
|
4
18
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.65",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
|
|
@@ -17,16 +17,16 @@
|
|
|
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": "3.0.0-alpha.
|
|
21
|
-
"@dynamic-labs/logger": "3.0.0-alpha.
|
|
22
|
-
"@dynamic-labs/message-transport": "3.0.0-alpha.
|
|
23
|
-
"@dynamic-labs/multi-wallet": "3.0.0-alpha.
|
|
24
|
-
"@dynamic-labs/rpc-providers": "3.0.0-alpha.
|
|
25
|
-
"@dynamic-labs/store": "3.0.0-alpha.
|
|
26
|
-
"@dynamic-labs/types": "3.0.0-alpha.
|
|
27
|
-
"@dynamic-labs/utils": "3.0.0-alpha.
|
|
28
|
-
"@dynamic-labs/wallet-book": "3.0.0-alpha.
|
|
29
|
-
"@dynamic-labs/wallet-connector-core": "3.0.0-alpha.
|
|
20
|
+
"@dynamic-labs/iconic": "3.0.0-alpha.65",
|
|
21
|
+
"@dynamic-labs/logger": "3.0.0-alpha.65",
|
|
22
|
+
"@dynamic-labs/message-transport": "3.0.0-alpha.65",
|
|
23
|
+
"@dynamic-labs/multi-wallet": "3.0.0-alpha.65",
|
|
24
|
+
"@dynamic-labs/rpc-providers": "3.0.0-alpha.65",
|
|
25
|
+
"@dynamic-labs/store": "3.0.0-alpha.65",
|
|
26
|
+
"@dynamic-labs/types": "3.0.0-alpha.65",
|
|
27
|
+
"@dynamic-labs/utils": "3.0.0-alpha.65",
|
|
28
|
+
"@dynamic-labs/wallet-book": "3.0.0-alpha.65",
|
|
29
|
+
"@dynamic-labs/wallet-connector-core": "3.0.0-alpha.65",
|
|
30
30
|
"eventemitter3": "5.0.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
@@ -105,7 +105,10 @@ const NetworkPicker = ({ activeClassName = '', buttonClassName = '', checkboxCla
|
|
|
105
105
|
const { loadingNetwork } = useInternalDynamicContext.useInternalDynamicContext();
|
|
106
106
|
const { data: supportedWalletNetworks } = usePromise.usePromise(() => walletConnectorCore.isWalletConnectConnector(connector)
|
|
107
107
|
? connector.getSupportedNetworks()
|
|
108
|
-
: Promise.resolve(evmNetworks.map(({ networkId }) => `${networkId}`)), {
|
|
108
|
+
: Promise.resolve(evmNetworks.map(({ networkId }) => `${networkId}`)), {
|
|
109
|
+
deps: [connector, evmNetworks, isNetworkPickerOpen],
|
|
110
|
+
initialData: undefined,
|
|
111
|
+
});
|
|
109
112
|
const shouldAllowOpenDropdown = isNetworkUnsupported.isNetworkUnsupported(currentNetwork, evmNetworks) ||
|
|
110
113
|
(evmNetworks === null || evmNetworks === void 0 ? void 0 : evmNetworks.length) > 1;
|
|
111
114
|
// Ref to anchor popper to
|
|
@@ -101,7 +101,10 @@ const NetworkPicker = ({ activeClassName = '', buttonClassName = '', checkboxCla
|
|
|
101
101
|
const { loadingNetwork } = useInternalDynamicContext();
|
|
102
102
|
const { data: supportedWalletNetworks } = usePromise(() => isWalletConnectConnector(connector)
|
|
103
103
|
? connector.getSupportedNetworks()
|
|
104
|
-
: Promise.resolve(evmNetworks.map(({ networkId }) => `${networkId}`)), {
|
|
104
|
+
: Promise.resolve(evmNetworks.map(({ networkId }) => `${networkId}`)), {
|
|
105
|
+
deps: [connector, evmNetworks, isNetworkPickerOpen],
|
|
106
|
+
initialData: undefined,
|
|
107
|
+
});
|
|
105
108
|
const shouldAllowOpenDropdown = isNetworkUnsupported(currentNetwork, evmNetworks) ||
|
|
106
109
|
(evmNetworks === null || evmNetworks === void 0 ? void 0 : evmNetworks.length) > 1;
|
|
107
110
|
// Ref to anchor popper to
|
|
@@ -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.
|
|
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 (!
|
|
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
|
|
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
|
-
|
|
20
|
+
ApiEndpoint.__baseUrl__ = new sdkApiCore.Configuration().basePath;
|
|
34
21
|
}
|
|
35
|
-
else
|
|
36
|
-
|
|
22
|
+
else {
|
|
23
|
+
ApiEndpoint.__baseUrl__ = baseUrlInput;
|
|
37
24
|
}
|
|
38
|
-
Object.freeze(ApiEndpoint);
|
|
39
25
|
};
|
|
40
26
|
|
|
41
27
|
module.exports = 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.
|
|
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 (!
|
|
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
|
|
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
|
-
|
|
18
|
+
ApiEndpoint.__baseUrl__ = new Configuration().basePath;
|
|
32
19
|
}
|
|
33
|
-
else
|
|
34
|
-
|
|
20
|
+
else {
|
|
21
|
+
ApiEndpoint.__baseUrl__ = baseUrlInput;
|
|
35
22
|
}
|
|
36
|
-
Object.freeze(ApiEndpoint);
|
|
37
23
|
};
|
|
38
24
|
|
|
39
25
|
export { ApiEndpoint as default };
|
|
@@ -152,11 +152,12 @@ const useNetworkConfigurations = ({ environmentId, projectSettings, evmNetworksO
|
|
|
152
152
|
}), {
|
|
153
153
|
deps: [environmentId, projectSettings, evmNetworksOverrides],
|
|
154
154
|
enabled: Boolean(projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.networks),
|
|
155
|
+
initialData: undefined,
|
|
155
156
|
onResolve: (networkConfigurations) => {
|
|
156
157
|
const expiry = new Date().getTime() + 60000 * 5;
|
|
157
158
|
setNetworkConfigurations({
|
|
158
159
|
expiresAt: expiry,
|
|
159
|
-
networkConfigurations,
|
|
160
|
+
networkConfigurations: networkConfigurations,
|
|
160
161
|
});
|
|
161
162
|
},
|
|
162
163
|
});
|
|
@@ -148,11 +148,12 @@ const useNetworkConfigurations = ({ environmentId, projectSettings, evmNetworksO
|
|
|
148
148
|
}), {
|
|
149
149
|
deps: [environmentId, projectSettings, evmNetworksOverrides],
|
|
150
150
|
enabled: Boolean(projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.networks),
|
|
151
|
+
initialData: undefined,
|
|
151
152
|
onResolve: (networkConfigurations) => {
|
|
152
153
|
const expiry = new Date().getTime() + 60000 * 5;
|
|
153
154
|
setNetworkConfigurations({
|
|
154
155
|
expiresAt: expiry,
|
|
155
|
-
networkConfigurations,
|
|
156
|
+
networkConfigurations: networkConfigurations,
|
|
156
157
|
});
|
|
157
158
|
},
|
|
158
159
|
});
|