@dynamic-labs/sdk-react-core 0.18.100-viem.1 → 0.18.100-viem.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
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
|
|
2
|
+
### [0.18.100-viem.2](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.1...v0.18.100-viem.2) (2023-08-15)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* re-enable bloctoevm ([#2992](https://github.com/dynamic-labs/DynamicAuth/issues/2992)) ([d027f39](https://github.com/dynamic-labs/DynamicAuth/commit/d027f39c8fb5bf477ce0da0c62d86cd812f0fda5))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **captcha:** complete sign in with magic and blocto ([#2967](https://github.com/dynamic-labs/DynamicAuth/issues/2967)) ([#2985](https://github.com/dynamic-labs/DynamicAuth/issues/2985)) ([e7585f5](https://github.com/dynamic-labs/DynamicAuth/commit/e7585f525da29e7933871831fa6fd374f09618b7))
|
|
13
|
+
* sync wagmi correctly in connect-only mode ([#2990](https://github.com/dynamic-labs/DynamicAuth/issues/2990)) ([#2993](https://github.com/dynamic-labs/DynamicAuth/issues/2993)) ([74a4e62](https://github.com/dynamic-labs/DynamicAuth/commit/74a4e6216f3f9fb30e5312789fb18f77277e15ba))
|
|
14
|
+
|
|
2
15
|
## [0.18.0-beta.32](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.0-beta.31...v0.18.0-beta.32) (2023-08-09)
|
|
3
16
|
|
|
4
17
|
|
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": "0.18.100-viem.
|
|
3
|
+
"version": "0.18.100-viem.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
"yup": "0.32.11",
|
|
16
16
|
"formik": "2.2.9",
|
|
17
17
|
"qrcode": "1.5.1",
|
|
18
|
-
"@dynamic-labs/logger": "0.18.100-viem.
|
|
19
|
-
"@dynamic-labs/multi-wallet": "0.18.100-viem.
|
|
20
|
-
"@dynamic-labs/rpc-providers": "0.18.100-viem.
|
|
21
|
-
"@dynamic-labs/types": "0.18.100-viem.
|
|
22
|
-
"@dynamic-labs/utils": "0.18.100-viem.
|
|
23
|
-
"@dynamic-labs/wallet-book": "0.18.100-viem.
|
|
24
|
-
"@dynamic-labs/wallet-connector-core": "0.18.100-viem.
|
|
18
|
+
"@dynamic-labs/logger": "0.18.100-viem.2",
|
|
19
|
+
"@dynamic-labs/multi-wallet": "0.18.100-viem.2",
|
|
20
|
+
"@dynamic-labs/rpc-providers": "0.18.100-viem.2",
|
|
21
|
+
"@dynamic-labs/types": "0.18.100-viem.2",
|
|
22
|
+
"@dynamic-labs/utils": "0.18.100-viem.2",
|
|
23
|
+
"@dynamic-labs/wallet-book": "0.18.100-viem.2",
|
|
24
|
+
"@dynamic-labs/wallet-connector-core": "0.18.100-viem.2",
|
|
25
25
|
"eventemitter3": "5.0.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _tslib = require('../../../../_virtual/_tslib.cjs');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var iconic = require('@dynamic-labs/iconic');
|
|
8
|
+
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
8
9
|
require('react');
|
|
9
10
|
var Typography = require('../../components/Typography/Typography.cjs');
|
|
10
11
|
require('@dynamic-labs/sdk-api');
|
|
11
12
|
require('../../shared/logger.cjs');
|
|
12
|
-
require('@dynamic-labs/wallet-connector-core');
|
|
13
13
|
var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
|
|
14
14
|
require('@dynamic-labs/wallet-book');
|
|
15
15
|
require('@dynamic-labs/utils');
|
|
@@ -47,7 +47,7 @@ require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
|
47
47
|
var Captcha = require('../../components/Captcha/Captcha.cjs');
|
|
48
48
|
|
|
49
49
|
const CaptchaVerifyUser = () => {
|
|
50
|
-
const { consumeNonce, displaySiweStatement, environmentId, projectSettings, setIsSingleWalletAccount, selectedWalletConnector: walletConnector, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
50
|
+
const { consumeNonce, displaySiweStatement, environmentId, projectSettings, setIsSingleWalletAccount, selectedWalletConnector: walletConnector, walletUiUtils, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
51
51
|
const { setView } = ViewContext.useViewContext();
|
|
52
52
|
const { setCaptchaToken } = CaptchaContext.useCaptchaContext();
|
|
53
53
|
const verifyWallet = useVerifyWallet.useVerifyWallet({
|
|
@@ -65,7 +65,13 @@ const CaptchaVerifyUser = () => {
|
|
|
65
65
|
if (!publicWalletAddress) {
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
|
-
|
|
68
|
+
if (!walletConnectorCore.isEmbeddedConnector(walletConnector) ||
|
|
69
|
+
walletConnectorCore.isBloctoConnector(walletConnector)) {
|
|
70
|
+
setView('pending-signature');
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
walletUiUtils.disabledConfirmationOnce();
|
|
74
|
+
}
|
|
69
75
|
if (requiresTwoStepAuthentication.requiresTwoStepAuthentication(walletConnector)) {
|
|
70
76
|
setCaptchaToken(captchaToken);
|
|
71
77
|
return;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../_virtual/_tslib.js';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { CaptchaWaveIcon } from '@dynamic-labs/iconic';
|
|
4
|
+
import { isEmbeddedConnector, isBloctoConnector } from '@dynamic-labs/wallet-connector-core';
|
|
4
5
|
import 'react';
|
|
5
6
|
import { Typography } from '../../components/Typography/Typography.js';
|
|
6
7
|
import '@dynamic-labs/sdk-api';
|
|
7
8
|
import '../../shared/logger.js';
|
|
8
|
-
import '@dynamic-labs/wallet-connector-core';
|
|
9
9
|
import { useViewContext } from '../../context/ViewContext/ViewContext.js';
|
|
10
10
|
import '@dynamic-labs/wallet-book';
|
|
11
11
|
import '@dynamic-labs/utils';
|
|
@@ -43,7 +43,7 @@ import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
|
43
43
|
import { Captcha } from '../../components/Captcha/Captcha.js';
|
|
44
44
|
|
|
45
45
|
const CaptchaVerifyUser = () => {
|
|
46
|
-
const { consumeNonce, displaySiweStatement, environmentId, projectSettings, setIsSingleWalletAccount, selectedWalletConnector: walletConnector, } = useInternalDynamicContext();
|
|
46
|
+
const { consumeNonce, displaySiweStatement, environmentId, projectSettings, setIsSingleWalletAccount, selectedWalletConnector: walletConnector, walletUiUtils, } = useInternalDynamicContext();
|
|
47
47
|
const { setView } = useViewContext();
|
|
48
48
|
const { setCaptchaToken } = useCaptchaContext();
|
|
49
49
|
const verifyWallet = useVerifyWallet({
|
|
@@ -61,7 +61,13 @@ const CaptchaVerifyUser = () => {
|
|
|
61
61
|
if (!publicWalletAddress) {
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
if (!isEmbeddedConnector(walletConnector) ||
|
|
65
|
+
isBloctoConnector(walletConnector)) {
|
|
66
|
+
setView('pending-signature');
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
walletUiUtils.disabledConfirmationOnce();
|
|
70
|
+
}
|
|
65
71
|
if (requiresTwoStepAuthentication(walletConnector)) {
|
|
66
72
|
setCaptchaToken(captchaToken);
|
|
67
73
|
return;
|