@dynamic-labs/sdk-react-core 2.0.0-alpha.0 → 2.0.0-alpha.2
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 -2
- package/package.js +1 -2
- package/package.json +13 -13
- package/src/lib/context/DynamicContext/types/index.d.ts +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +1 -8
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +1 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
|
|
2
|
+
## [2.0.0-alpha.2](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) (2024-02-13)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* old iconic dependency version ([#4673](https://github.com/dynamic-labs/DynamicAuth/issues/4673)) ([4a5c448](https://github.com/dynamic-labs/DynamicAuth/commit/4a5c448c251540139f84514328d5f1d31808d75c))
|
|
8
|
+
|
|
9
|
+
## [2.0.0-alpha.1](https://github.com/dynamic-labs/DynamicAuth/compare/v2.0.0-alpha.0...v2.0.0-alpha.1) (2024-02-12)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* fix make tabs style attribute optional ([#4667](https://github.com/dynamic-labs/DynamicAuth/issues/4667))
|
|
15
|
+
|
|
2
16
|
## [2.0.0-alpha.0](https://github.com/dynamic-labs/DynamicAuth/compare/v1.2.0-alpha.1...v2.0.0-alpha.0) (2024-02-12)
|
|
3
17
|
|
|
4
18
|
|
package/package.cjs
CHANGED
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var version = "2.0.0-alpha.
|
|
5
|
+
var version = "2.0.0-alpha.2";
|
|
6
6
|
var dependencies = {
|
|
7
|
-
"@dynamic-labs/iconic": "0.1.52",
|
|
8
7
|
"@dynamic-labs/sdk-api": "0.0.363",
|
|
9
8
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
10
9
|
"country-list": "2.3.0",
|
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
7
7
|
"directory": "packages/sdk-react-core"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@dynamic-labs/iconic": "0.1.52",
|
|
11
10
|
"@dynamic-labs/sdk-api": "0.0.363",
|
|
12
11
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
13
12
|
"country-list": "2.3.0",
|
|
@@ -17,23 +16,24 @@
|
|
|
17
16
|
"react-focus-lock": "2.9.2",
|
|
18
17
|
"react-i18next": "^13.2.0",
|
|
19
18
|
"yup": "0.32.11",
|
|
20
|
-
"@dynamic-labs/ethereum": "2.0.0-alpha.
|
|
21
|
-
"@dynamic-labs/
|
|
22
|
-
"@dynamic-labs/
|
|
23
|
-
"@dynamic-labs/
|
|
24
|
-
"@dynamic-labs/
|
|
25
|
-
"@dynamic-labs/
|
|
26
|
-
"@dynamic-labs/
|
|
27
|
-
"@dynamic-labs/
|
|
28
|
-
"@dynamic-labs/wallet-
|
|
19
|
+
"@dynamic-labs/ethereum": "2.0.0-alpha.2",
|
|
20
|
+
"@dynamic-labs/iconic": "2.0.0-alpha.2",
|
|
21
|
+
"@dynamic-labs/logger": "2.0.0-alpha.2",
|
|
22
|
+
"@dynamic-labs/multi-wallet": "2.0.0-alpha.2",
|
|
23
|
+
"@dynamic-labs/rpc-providers": "2.0.0-alpha.2",
|
|
24
|
+
"@dynamic-labs/types": "2.0.0-alpha.2",
|
|
25
|
+
"@dynamic-labs/utils": "2.0.0-alpha.2",
|
|
26
|
+
"@dynamic-labs/viem-utils": "2.0.0-alpha.2",
|
|
27
|
+
"@dynamic-labs/wallet-book": "2.0.0-alpha.2",
|
|
28
|
+
"@dynamic-labs/wallet-connector-core": "2.0.0-alpha.2",
|
|
29
29
|
"eventemitter3": "5.0.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"semver": "7.5.4"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"react": "^
|
|
36
|
-
"react-dom": "^
|
|
35
|
+
"react": "^18.0.0",
|
|
36
|
+
"react-dom": "^18.0.0",
|
|
37
37
|
"viem": "^1.19.13 || ^2.2.0"
|
|
38
38
|
},
|
|
39
39
|
"description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
|
|
@@ -139,11 +139,6 @@ const useConnectAndSign = ({ shouldUpdateWallets = true, shouldCallCallback = tr
|
|
|
139
139
|
}
|
|
140
140
|
const { address } = connectionResult;
|
|
141
141
|
const walletNetwork = yield walletConnector.getNetwork();
|
|
142
|
-
// When we switch networks on MM/walletconnect, it breaks the flow and doesn't always display the sign message
|
|
143
|
-
// Since it the network doesn't matter for the sign, we don't need to force the user to switch to the supported
|
|
144
|
-
// network at this stage and they can switch when doing a transaction
|
|
145
|
-
// Note: not checking specifically for MM since user can choose walletconnect connector to use with MM
|
|
146
|
-
const shouldForceSupportedNetwork = !walletConnector.isWalletConnect;
|
|
147
142
|
const usesSupportedNetwork = isSupportedNetwork.isSupportedNetwork({
|
|
148
143
|
network: walletNetwork,
|
|
149
144
|
walletConnector,
|
|
@@ -152,9 +147,7 @@ const useConnectAndSign = ({ shouldUpdateWallets = true, shouldCallCallback = tr
|
|
|
152
147
|
if (!isProgrammableNetworkSwitchSupported.isProgrammableNetworkSwitchSupported(walletConnector)) {
|
|
153
148
|
return setView('network-not-supported-manual');
|
|
154
149
|
}
|
|
155
|
-
|
|
156
|
-
return setView('network-not-supported');
|
|
157
|
-
}
|
|
150
|
+
return setView('network-not-supported');
|
|
158
151
|
}
|
|
159
152
|
if (isConnectOnly.isConnectOnly(user, authMode)) {
|
|
160
153
|
localStorage.LocalStorage.setToLS(localStorage$1.LAST_USED_WALLET, walletConnector.key);
|
|
@@ -135,11 +135,6 @@ const useConnectAndSign = ({ shouldUpdateWallets = true, shouldCallCallback = tr
|
|
|
135
135
|
}
|
|
136
136
|
const { address } = connectionResult;
|
|
137
137
|
const walletNetwork = yield walletConnector.getNetwork();
|
|
138
|
-
// When we switch networks on MM/walletconnect, it breaks the flow and doesn't always display the sign message
|
|
139
|
-
// Since it the network doesn't matter for the sign, we don't need to force the user to switch to the supported
|
|
140
|
-
// network at this stage and they can switch when doing a transaction
|
|
141
|
-
// Note: not checking specifically for MM since user can choose walletconnect connector to use with MM
|
|
142
|
-
const shouldForceSupportedNetwork = !walletConnector.isWalletConnect;
|
|
143
138
|
const usesSupportedNetwork = isSupportedNetwork({
|
|
144
139
|
network: walletNetwork,
|
|
145
140
|
walletConnector,
|
|
@@ -148,9 +143,7 @@ const useConnectAndSign = ({ shouldUpdateWallets = true, shouldCallCallback = tr
|
|
|
148
143
|
if (!isProgrammableNetworkSwitchSupported(walletConnector)) {
|
|
149
144
|
return setView('network-not-supported-manual');
|
|
150
145
|
}
|
|
151
|
-
|
|
152
|
-
return setView('network-not-supported');
|
|
153
|
-
}
|
|
146
|
+
return setView('network-not-supported');
|
|
154
147
|
}
|
|
155
148
|
if (isConnectOnly(user, authMode)) {
|
|
156
149
|
LocalStorage.setToLS(LAST_USED_WALLET, walletConnector.key);
|