@dynamic-labs/sdk-react-core 2.0.0-alpha.26 → 2.0.0-alpha.27
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 +9 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +13 -13
- package/src/lib/components/CopyButton/CopyButton.cjs +7 -2
- package/src/lib/components/CopyButton/CopyButton.d.ts +4 -2
- package/src/lib/components/CopyButton/CopyButton.js +7 -2
- package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.cjs +19 -10
- package/src/lib/components/QrCodeWrapper/QrCodeContainer/QrCodeContainer.js +19 -10
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +11 -2
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +11 -2
- package/src/lib/locale/en/translation.cjs +7 -4
- package/src/lib/locale/en/translation.d.ts +5 -2
- package/src/lib/locale/en/translation.js +7 -4
- package/src/lib/shared/consts/index.cjs +1 -1
- package/src/lib/shared/consts/index.js +1 -1
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.cjs +0 -1
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.js +0 -1
- package/src/lib/utils/hooks/authenticationHooks/helpers/showPendingConnectView.cjs +2 -2
- package/src/lib/utils/hooks/authenticationHooks/helpers/showPendingConnectView.js +2 -2
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.cjs +3 -0
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.js +3 -0
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _tslib = require('../../../../../../_virtual/_tslib.cjs');
|
|
6
6
|
var getWalletProvider = require('../../../functions/getWalletProvider/getWalletProvider.cjs');
|
|
7
7
|
|
|
8
|
-
const specialCareWallets = ['
|
|
8
|
+
const specialCareWallets = ['bloctoevm', 'perawallet'];
|
|
9
9
|
const showPendingConnectView = (walletConnector, setView) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
10
10
|
const walletProvider = getWalletProvider.getWalletProvider(walletConnector);
|
|
11
11
|
// We don't want to show the pending connect view for qrCode and walletConnect
|
|
@@ -15,7 +15,7 @@ const showPendingConnectView = (walletConnector, setView) => _tslib.__awaiter(vo
|
|
|
15
15
|
}
|
|
16
16
|
specialCareWallets.forEach((wallet) => {
|
|
17
17
|
if (walletConnector.key === wallet) {
|
|
18
|
-
//
|
|
18
|
+
// bloctoevm and some other wallets works different as Justin mentioned in this commit:
|
|
19
19
|
// https://github.com/dynamic-labs/DynamicAuth/commit/57233d3620611bc91439f3d4587b8516f8d16f99
|
|
20
20
|
// It needs to show the connect view before getting connected accounts
|
|
21
21
|
setView('pending-connect');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../../../_virtual/_tslib.js';
|
|
2
2
|
import { getWalletProvider } from '../../../functions/getWalletProvider/getWalletProvider.js';
|
|
3
3
|
|
|
4
|
-
const specialCareWallets = ['
|
|
4
|
+
const specialCareWallets = ['bloctoevm', 'perawallet'];
|
|
5
5
|
const showPendingConnectView = (walletConnector, setView) => __awaiter(void 0, void 0, void 0, function* () {
|
|
6
6
|
const walletProvider = getWalletProvider(walletConnector);
|
|
7
7
|
// We don't want to show the pending connect view for qrCode and walletConnect
|
|
@@ -11,7 +11,7 @@ const showPendingConnectView = (walletConnector, setView) => __awaiter(void 0, v
|
|
|
11
11
|
}
|
|
12
12
|
specialCareWallets.forEach((wallet) => {
|
|
13
13
|
if (walletConnector.key === wallet) {
|
|
14
|
-
//
|
|
14
|
+
// bloctoevm and some other wallets works different as Justin mentioned in this commit:
|
|
15
15
|
// https://github.com/dynamic-labs/DynamicAuth/commit/57233d3620611bc91439f3d4587b8516f8d16f99
|
|
16
16
|
// It needs to show the connect view before getting connected accounts
|
|
17
17
|
setView('pending-connect');
|
|
@@ -114,6 +114,9 @@ const useSubmitPhoneNumber = ({ onSubmit, onSubmitError, country, phone, setInva
|
|
|
114
114
|
setView(view.type);
|
|
115
115
|
if (error instanceof utils.SmsVerificationError) {
|
|
116
116
|
let message = t('dyn_login.helper.phone_number_form.invalid_phone');
|
|
117
|
+
if (error.code === 'too_many_sms_verification_attempts') {
|
|
118
|
+
message = t('dyn_login.helper.phone_number_form.too_many_sms_verification_attempts');
|
|
119
|
+
}
|
|
117
120
|
// Use the code from error message if a translation for it exists
|
|
118
121
|
if (error.code &&
|
|
119
122
|
error.code in translation.translation.dyn_login.helper.phone_number_form)
|
|
@@ -110,6 +110,9 @@ const useSubmitPhoneNumber = ({ onSubmit, onSubmitError, country, phone, setInva
|
|
|
110
110
|
setView(view.type);
|
|
111
111
|
if (error instanceof SmsVerificationError) {
|
|
112
112
|
let message = t('dyn_login.helper.phone_number_form.invalid_phone');
|
|
113
|
+
if (error.code === 'too_many_sms_verification_attempts') {
|
|
114
|
+
message = t('dyn_login.helper.phone_number_form.too_many_sms_verification_attempts');
|
|
115
|
+
}
|
|
113
116
|
// Use the code from error message if a translation for it exists
|
|
114
117
|
if (error.code &&
|
|
115
118
|
error.code in translation.dyn_login.helper.phone_number_form)
|