@dynamic-labs/sdk-react-core 0.17.33 → 0.17.34
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,11 @@
|
|
|
1
1
|
|
|
2
|
+
### [0.17.34](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.33...v0.17.34) (2023-08-14)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* fix the captcha step with embedded wallets ([#2967](https://github.com/dynamic-labs/DynamicAuth/issues/2967)) ([#2984](https://github.com/dynamic-labs/DynamicAuth/issues/2984)) ([637effe](https://github.com/dynamic-labs/DynamicAuth/commit/637effe5e7c1f19d378924a3aad3f0a02b03bd8e))
|
|
8
|
+
|
|
2
9
|
### [0.17.33](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.32...v0.17.33) (2023-08-11)
|
|
3
10
|
|
|
4
11
|
|
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.17.
|
|
3
|
+
"version": "0.17.34",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
"formik": "2.2.9",
|
|
17
17
|
"qrcode": "1.5.1",
|
|
18
18
|
"ethers": "5.7.2",
|
|
19
|
-
"@dynamic-labs/logger": "0.17.
|
|
20
|
-
"@dynamic-labs/multi-wallet": "0.17.
|
|
21
|
-
"@dynamic-labs/rpc-providers": "0.17.
|
|
22
|
-
"@dynamic-labs/types": "0.17.
|
|
23
|
-
"@dynamic-labs/utils": "0.17.
|
|
24
|
-
"@dynamic-labs/wallet-book": "0.17.
|
|
25
|
-
"@dynamic-labs/wallet-connector-core": "0.17.
|
|
19
|
+
"@dynamic-labs/logger": "0.17.34",
|
|
20
|
+
"@dynamic-labs/multi-wallet": "0.17.34",
|
|
21
|
+
"@dynamic-labs/rpc-providers": "0.17.34",
|
|
22
|
+
"@dynamic-labs/types": "0.17.34",
|
|
23
|
+
"@dynamic-labs/utils": "0.17.34",
|
|
24
|
+
"@dynamic-labs/wallet-book": "0.17.34",
|
|
25
|
+
"@dynamic-labs/wallet-connector-core": "0.17.34"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"semver": "7.3.8"
|
|
@@ -5,12 +5,12 @@ 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
13
|
require('../../config/LSSuffix.cjs');
|
|
13
|
-
require('@dynamic-labs/wallet-connector-core');
|
|
14
14
|
var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
|
|
15
15
|
require('@dynamic-labs/utils');
|
|
16
16
|
require('../../utils/constants/colors.cjs');
|
|
@@ -45,7 +45,7 @@ require('../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
|
45
45
|
var Captcha = require('../../components/Captcha/Captcha.cjs');
|
|
46
46
|
|
|
47
47
|
const CaptchaVerifyUser = () => {
|
|
48
|
-
const { consumeNonce, displayTermsOfService, environmentId, projectSettings, setIsSingleWalletAccount, selectedWalletConnector: walletConnector, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
48
|
+
const { consumeNonce, displayTermsOfService, environmentId, projectSettings, setIsSingleWalletAccount, selectedWalletConnector: walletConnector, disableWalletConfirmationOnce, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
49
49
|
const { setView } = ViewContext.useViewContext();
|
|
50
50
|
const { setCaptchaToken } = CaptchaContext.useCaptchaContext();
|
|
51
51
|
const verifyWallet = useVerifyWallet.useVerifyWallet({
|
|
@@ -63,7 +63,12 @@ const CaptchaVerifyUser = () => {
|
|
|
63
63
|
if (!publicWalletAddress) {
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
if (!walletConnectorCore.isEmbeddedConnector(walletConnector)) {
|
|
67
|
+
setView('pending-signature');
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
disableWalletConfirmationOnce();
|
|
71
|
+
}
|
|
67
72
|
if (requiresTwoStepAuthentication.requiresTwoStepAuthentication(walletConnector)) {
|
|
68
73
|
setCaptchaToken(captchaToken);
|
|
69
74
|
return;
|
|
@@ -1,12 +1,12 @@
|
|
|
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 } 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
9
|
import '../../config/LSSuffix.js';
|
|
9
|
-
import '@dynamic-labs/wallet-connector-core';
|
|
10
10
|
import { useViewContext } from '../../context/ViewContext/ViewContext.js';
|
|
11
11
|
import '@dynamic-labs/utils';
|
|
12
12
|
import '../../utils/constants/colors.js';
|
|
@@ -41,7 +41,7 @@ import '../../components/MenuList/Dropdown/Dropdown.js';
|
|
|
41
41
|
import { Captcha } from '../../components/Captcha/Captcha.js';
|
|
42
42
|
|
|
43
43
|
const CaptchaVerifyUser = () => {
|
|
44
|
-
const { consumeNonce, displayTermsOfService, environmentId, projectSettings, setIsSingleWalletAccount, selectedWalletConnector: walletConnector, } = useInternalDynamicContext();
|
|
44
|
+
const { consumeNonce, displayTermsOfService, environmentId, projectSettings, setIsSingleWalletAccount, selectedWalletConnector: walletConnector, disableWalletConfirmationOnce, } = useInternalDynamicContext();
|
|
45
45
|
const { setView } = useViewContext();
|
|
46
46
|
const { setCaptchaToken } = useCaptchaContext();
|
|
47
47
|
const verifyWallet = useVerifyWallet({
|
|
@@ -59,7 +59,12 @@ const CaptchaVerifyUser = () => {
|
|
|
59
59
|
if (!publicWalletAddress) {
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
|
|
62
|
+
if (!isEmbeddedConnector(walletConnector)) {
|
|
63
|
+
setView('pending-signature');
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
disableWalletConfirmationOnce();
|
|
67
|
+
}
|
|
63
68
|
if (requiresTwoStepAuthentication(walletConnector)) {
|
|
64
69
|
setCaptchaToken(captchaToken);
|
|
65
70
|
return;
|