@dynamic-labs/sdk-react-core 4.0.0-alpha.1 → 4.0.0-alpha.3
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 +22 -0
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +12 -12
- package/src/lib/components/QRCode/QRCode.cjs +2 -2
- package/src/lib/components/QRCode/QRCode.js +2 -2
- package/src/lib/components/SendBalanceForm/SendBalanceForm.cjs +5 -1
- package/src/lib/components/SendBalanceForm/SendBalanceForm.js +5 -1
- package/src/lib/components/WalletInformationCard/WalletInformationCard.cjs +1 -1
- package/src/lib/components/WalletInformationCard/WalletInformationCard.js +1 -1
- package/src/lib/context/DynamicContext/DynamicContext.cjs +7 -4
- package/src/lib/context/DynamicContext/DynamicContext.js +7 -4
- package/src/lib/context/DynamicContext/types/DynamicContextProps.d.ts +1 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/hooks/authenticationHooks/helpers/showPendingConnectView.cjs +1 -1
- package/src/lib/utils/hooks/authenticationHooks/helpers/showPendingConnectView.js +1 -1
- package/src/lib/utils/hooks/useEndUserWarning/useEndUserWarning.cjs +5 -3
- package/src/lib/utils/hooks/useEndUserWarning/useEndUserWarning.d.ts +2 -1
- package/src/lib/utils/hooks/useEndUserWarning/useEndUserWarning.js +5 -3
- package/src/lib/utils/hooks/useResetCookieLocalStorage/useResetCookieLocalStorage.cjs +8 -1
- package/src/lib/utils/hooks/useResetCookieLocalStorage/useResetCookieLocalStorage.js +8 -1
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +148 -114
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +151 -117
- package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.cjs +1 -1
- package/src/lib/views/MfaChooseDeviceView/MfaChooseDeviceView.js +1 -1
- package/src/lib/views/WalletList/data.cjs +6 -1
- package/src/lib/views/WalletList/data.js +6 -1
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +3 -3
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.d.ts +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.0.0-alpha.3](https://github.com/dynamic-labs/DynamicAuth/compare/v4.0.0-alpha.2...v4.0.0-alpha.3) (2024-09-20)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* developers provide global connectivity appkit project id ([#6941](https://github.com/dynamic-labs/DynamicAuth/issues/6941)) ([83760ea](https://github.com/dynamic-labs/DynamicAuth/commit/83760ea57591685b12caee945f173f6a7f9312d1))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* don't try to set up event listeners if wallet provider doesn't support it ([#6943](https://github.com/dynamic-labs/DynamicAuth/issues/6943)) ([439f1bb](https://github.com/dynamic-labs/DynamicAuth/commit/439f1bbb3c765959756cfc6eeb8429e4018e0379))
|
|
13
|
+
* dont verify all signatures for solana embedded multisig tx ([#6953](https://github.com/dynamic-labs/DynamicAuth/issues/6953)) ([7a7973e](https://github.com/dynamic-labs/DynamicAuth/commit/7a7973e05f0960421b348a55c6a00c9fd873b0b7))
|
|
14
|
+
|
|
15
|
+
## [4.0.0-alpha.2](https://github.com/dynamic-labs/DynamicAuth/compare/v4.0.0-alpha.1...v4.0.0-alpha.2) (2024-09-18)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* add iconVariant prop to DynamicBridgeWidget ([#6915](https://github.com/dynamic-labs/DynamicAuth/issues/6915)) ([8aa0f3d](https://github.com/dynamic-labs/DynamicAuth/commit/8aa0f3d8d8c41c7b5c4796106f611f208010cb6d))
|
|
21
|
+
* allow to create extra embedded wallets in react-native ([#6923](https://github.com/dynamic-labs/DynamicAuth/issues/6923)) ([ba22f7b](https://github.com/dynamic-labs/DynamicAuth/commit/ba22f7bcf41a444a4df0aff9b6aec257457e9402))
|
|
22
|
+
* **client:** add hide method for auth and userProfile ui modules ([#6928](https://github.com/dynamic-labs/DynamicAuth/issues/6928)) ([a11a4a5](https://github.com/dynamic-labs/DynamicAuth/commit/a11a4a5d6e25ce2a916ebd52f0b341020dc1a7e5))
|
|
23
|
+
|
|
2
24
|
## [4.0.0-alpha.1](https://github.com/dynamic-labs/DynamicAuth/compare/v4.0.0-alpha.0...v4.0.0-alpha.1) (2024-09-17)
|
|
3
25
|
|
|
4
26
|
|
package/package.cjs
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var version = "4.0.0-alpha.
|
|
6
|
+
var version = "4.0.0-alpha.3";
|
|
7
7
|
var dependencies = {
|
|
8
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
8
|
+
"@dynamic-labs/sdk-api-core": "0.0.534",
|
|
9
9
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
10
10
|
"country-list": "2.3.0",
|
|
11
11
|
formik: "2.2.9",
|
package/package.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
var version = "4.0.0-alpha.
|
|
2
|
+
var version = "4.0.0-alpha.3";
|
|
3
3
|
var dependencies = {
|
|
4
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
4
|
+
"@dynamic-labs/sdk-api-core": "0.0.534",
|
|
5
5
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
6
6
|
"country-list": "2.3.0",
|
|
7
7
|
formik: "2.2.9",
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
|
|
7
7
|
"directory": "packages/sdk-react-core"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
10
|
+
"@dynamic-labs/sdk-api-core": "0.0.534",
|
|
11
11
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
12
12
|
"country-list": "2.3.0",
|
|
13
13
|
"formik": "2.2.9",
|
|
@@ -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": "4.0.0-alpha.
|
|
21
|
-
"@dynamic-labs/logger": "4.0.0-alpha.
|
|
22
|
-
"@dynamic-labs/message-transport": "4.0.0-alpha.
|
|
23
|
-
"@dynamic-labs/multi-wallet": "4.0.0-alpha.
|
|
24
|
-
"@dynamic-labs/rpc-providers": "4.0.0-alpha.
|
|
25
|
-
"@dynamic-labs/store": "4.0.0-alpha.
|
|
26
|
-
"@dynamic-labs/types": "4.0.0-alpha.
|
|
27
|
-
"@dynamic-labs/utils": "4.0.0-alpha.
|
|
28
|
-
"@dynamic-labs/wallet-book": "4.0.0-alpha.
|
|
29
|
-
"@dynamic-labs/wallet-connector-core": "4.0.0-alpha.
|
|
20
|
+
"@dynamic-labs/iconic": "4.0.0-alpha.3",
|
|
21
|
+
"@dynamic-labs/logger": "4.0.0-alpha.3",
|
|
22
|
+
"@dynamic-labs/message-transport": "4.0.0-alpha.3",
|
|
23
|
+
"@dynamic-labs/multi-wallet": "4.0.0-alpha.3",
|
|
24
|
+
"@dynamic-labs/rpc-providers": "4.0.0-alpha.3",
|
|
25
|
+
"@dynamic-labs/store": "4.0.0-alpha.3",
|
|
26
|
+
"@dynamic-labs/types": "4.0.0-alpha.3",
|
|
27
|
+
"@dynamic-labs/utils": "4.0.0-alpha.3",
|
|
28
|
+
"@dynamic-labs/wallet-book": "4.0.0-alpha.3",
|
|
29
|
+
"@dynamic-labs/wallet-connector-core": "4.0.0-alpha.3",
|
|
30
30
|
"eventemitter3": "5.0.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
@@ -103,7 +103,7 @@ const generateMatrix = (value, errorCorrectionLevel) => {
|
|
|
103
103
|
? rows.push([key])
|
|
104
104
|
: rows[rows.length - 1].push(key)) && rows, []);
|
|
105
105
|
};
|
|
106
|
-
const QRCode = ({ ecl = 'M', Icon, logoMargin = 0, logoSize = 40, size = 250, value, accentColor, walletKey = undefined, showQrCodeImage, }) => {
|
|
106
|
+
const QRCode = ({ ecl = 'M', Icon, logoMargin = 0, logoSize = 40, size = 250, value, accentColor = 'currentColor', walletKey = undefined, showQrCodeImage, }) => {
|
|
107
107
|
const { data } = usePromise.usePromise(() => QRCodeUtil__default["default"].toDataURL(value));
|
|
108
108
|
const dots = React.useMemo(() => {
|
|
109
109
|
const dots = [];
|
|
@@ -118,7 +118,7 @@ const QRCode = ({ ecl = 'M', Icon, logoMargin = 0, logoSize = 40, size = 250, va
|
|
|
118
118
|
const x1 = (matrix.length - 7) * cellSize * x;
|
|
119
119
|
const y1 = (matrix.length - 7) * cellSize * y;
|
|
120
120
|
for (let i = 0; i < 3; i++) {
|
|
121
|
-
dots.push(jsxRuntime.jsx("rect", { fill: i % 2 !== 0 ? '
|
|
121
|
+
dots.push(jsxRuntime.jsx("rect", { "data-key": `corner-square-${x}-${y}-${i}`, fill: i % 2 !== 0 ? 'var(--background)' : accentColor, height: cellSize * (7 - i * 2), rx: i === 0 ? 10 : i === 1 ? 7 : 20, ry: i === 0 ? 10 : i === 1 ? 7 : 20, width: cellSize * (7 - i * 2), x: x1 + cellSize * i, y: y1 + cellSize * i }, `corner-square-${x}-${y}-${i}`));
|
|
122
122
|
}
|
|
123
123
|
});
|
|
124
124
|
const clearArenaSize = Math.floor((logoSize * 1.5) / cellSize);
|
|
@@ -95,7 +95,7 @@ const generateMatrix = (value, errorCorrectionLevel) => {
|
|
|
95
95
|
? rows.push([key])
|
|
96
96
|
: rows[rows.length - 1].push(key)) && rows, []);
|
|
97
97
|
};
|
|
98
|
-
const QRCode = ({ ecl = 'M', Icon, logoMargin = 0, logoSize = 40, size = 250, value, accentColor, walletKey = undefined, showQrCodeImage, }) => {
|
|
98
|
+
const QRCode = ({ ecl = 'M', Icon, logoMargin = 0, logoSize = 40, size = 250, value, accentColor = 'currentColor', walletKey = undefined, showQrCodeImage, }) => {
|
|
99
99
|
const { data } = usePromise(() => QRCodeUtil.toDataURL(value));
|
|
100
100
|
const dots = useMemo(() => {
|
|
101
101
|
const dots = [];
|
|
@@ -110,7 +110,7 @@ const QRCode = ({ ecl = 'M', Icon, logoMargin = 0, logoSize = 40, size = 250, va
|
|
|
110
110
|
const x1 = (matrix.length - 7) * cellSize * x;
|
|
111
111
|
const y1 = (matrix.length - 7) * cellSize * y;
|
|
112
112
|
for (let i = 0; i < 3; i++) {
|
|
113
|
-
dots.push(jsx("rect", { fill: i % 2 !== 0 ? '
|
|
113
|
+
dots.push(jsx("rect", { "data-key": `corner-square-${x}-${y}-${i}`, fill: i % 2 !== 0 ? 'var(--background)' : accentColor, height: cellSize * (7 - i * 2), rx: i === 0 ? 10 : i === 1 ? 7 : 20, ry: i === 0 ? 10 : i === 1 ? 7 : 20, width: cellSize * (7 - i * 2), x: x1 + cellSize * i, y: y1 + cellSize * i }, `corner-square-${x}-${y}-${i}`));
|
|
114
114
|
}
|
|
115
115
|
});
|
|
116
116
|
const clearArenaSize = Math.floor((logoSize * 1.5) / cellSize);
|
|
@@ -153,7 +153,7 @@ const SendBalanceForm = ({ initialValues, onSubmit, decimals = 18, validateAddre
|
|
|
153
153
|
}),
|
|
154
154
|
});
|
|
155
155
|
}, [decimals, validateAddress, validateAmount]);
|
|
156
|
-
return (jsxRuntime.jsx(formik.Formik, { initialValues: initialValues || sendBalanceFormInitialValues, validationSchema: sendBalanceFormValidationSchema, onSubmit: (values) => onSubmit(values), validateOnChange: false, validateOnBlur: false, children: ({ errors, touched, values, handleChange, setFieldValue, setErrors, }) => {
|
|
156
|
+
return (jsxRuntime.jsx(formik.Formik, { initialValues: initialValues || sendBalanceFormInitialValues, validationSchema: sendBalanceFormValidationSchema, onSubmit: (values) => onSubmit(values), validateOnChange: false, validateOnBlur: false, children: ({ errors, touched, values, handleChange, setFieldValue, setErrors, handleBlur, setFieldTouched, validateField, }) => {
|
|
157
157
|
var _a;
|
|
158
158
|
return (jsxRuntime.jsxs(formik.Form, { className: 'send-balance-form', children: [jsxRuntime.jsxs("div", { className: 'send-balance-page-layout__balance-container', children: [jsxRuntime.jsx(FormFieldLabel.FormFieldLabel, { children: "Select any token" }), jsxRuntime.jsx(TokensBalanceDropdown.TokensBalanceDropdown, { tokenBalances: tokenBalances !== null && tokenBalances !== void 0 ? tokenBalances : (currentToken && [currentToken]), currentToken: currentToken, setCurrentToken: setCurrentToken, isLoading: isLoading, setFieldValue: setFieldValue, setErrors: setErrors })] }), jsxRuntime.jsxs("div", { className: 'send-balance-form__amount-container', children: [jsxRuntime.jsx(formik.Field, { variant: 'regular', className: `send-balance-form__amount-container__field ${showFiat ? 'fiat' : ''}`, name: 'amount', id: 'amount', onChange: (e) => {
|
|
159
159
|
const newValue = e.target.value;
|
|
@@ -168,6 +168,10 @@ const SendBalanceForm = ({ initialValues, onSubmit, decimals = 18, validateAddre
|
|
|
168
168
|
return;
|
|
169
169
|
}
|
|
170
170
|
sendBalances.setSendBalanceVariable('amount', (currentToken === null || currentToken === void 0 ? void 0 : currentToken.price) ? Number(newValue) : undefined);
|
|
171
|
+
}, onBlur: (e) => {
|
|
172
|
+
handleBlur(e);
|
|
173
|
+
setFieldTouched('amount', true);
|
|
174
|
+
validateField('amount');
|
|
171
175
|
}, placeholder: t('dyn_send_transaction.data.amount.placeholder'), as: Input.Input, error: errors['amount'], copykey: 'dyn_send_transaction.data.amount.label', message: touched['amount'] &&
|
|
172
176
|
getDisplayErrorMessage(errors, t, 'amount', decimals), style: {
|
|
173
177
|
paddingLeft: `${leftSymbolPadding}px`,
|
|
@@ -149,7 +149,7 @@ const SendBalanceForm = ({ initialValues, onSubmit, decimals = 18, validateAddre
|
|
|
149
149
|
}),
|
|
150
150
|
});
|
|
151
151
|
}, [decimals, validateAddress, validateAmount]);
|
|
152
|
-
return (jsx(Formik, { initialValues: initialValues || sendBalanceFormInitialValues, validationSchema: sendBalanceFormValidationSchema, onSubmit: (values) => onSubmit(values), validateOnChange: false, validateOnBlur: false, children: ({ errors, touched, values, handleChange, setFieldValue, setErrors, }) => {
|
|
152
|
+
return (jsx(Formik, { initialValues: initialValues || sendBalanceFormInitialValues, validationSchema: sendBalanceFormValidationSchema, onSubmit: (values) => onSubmit(values), validateOnChange: false, validateOnBlur: false, children: ({ errors, touched, values, handleChange, setFieldValue, setErrors, handleBlur, setFieldTouched, validateField, }) => {
|
|
153
153
|
var _a;
|
|
154
154
|
return (jsxs(Form, { className: 'send-balance-form', children: [jsxs("div", { className: 'send-balance-page-layout__balance-container', children: [jsx(FormFieldLabel, { children: "Select any token" }), jsx(TokensBalanceDropdown, { tokenBalances: tokenBalances !== null && tokenBalances !== void 0 ? tokenBalances : (currentToken && [currentToken]), currentToken: currentToken, setCurrentToken: setCurrentToken, isLoading: isLoading, setFieldValue: setFieldValue, setErrors: setErrors })] }), jsxs("div", { className: 'send-balance-form__amount-container', children: [jsx(Field, { variant: 'regular', className: `send-balance-form__amount-container__field ${showFiat ? 'fiat' : ''}`, name: 'amount', id: 'amount', onChange: (e) => {
|
|
155
155
|
const newValue = e.target.value;
|
|
@@ -164,6 +164,10 @@ const SendBalanceForm = ({ initialValues, onSubmit, decimals = 18, validateAddre
|
|
|
164
164
|
return;
|
|
165
165
|
}
|
|
166
166
|
setSendBalanceVariable('amount', (currentToken === null || currentToken === void 0 ? void 0 : currentToken.price) ? Number(newValue) : undefined);
|
|
167
|
+
}, onBlur: (e) => {
|
|
168
|
+
handleBlur(e);
|
|
169
|
+
setFieldTouched('amount', true);
|
|
170
|
+
validateField('amount');
|
|
167
171
|
}, placeholder: t('dyn_send_transaction.data.amount.placeholder'), as: Input, error: errors['amount'], copykey: 'dyn_send_transaction.data.amount.label', message: touched['amount'] &&
|
|
168
172
|
getDisplayErrorMessage(errors, t, 'amount', decimals), style: {
|
|
169
173
|
paddingLeft: `${leftSymbolPadding}px`,
|
|
@@ -24,7 +24,7 @@ var Icon = require('../Icon/Icon.cjs');
|
|
|
24
24
|
const WalletInformationCard = ({ address, ens, balance, icon, network, menu, }) => {
|
|
25
25
|
const { t } = reactI18next.useTranslation();
|
|
26
26
|
const details = React.useMemo(() => {
|
|
27
|
-
const shortenAddress = shortenWalletAddress.shortenWalletAddress(address
|
|
27
|
+
const shortenAddress = shortenWalletAddress.shortenWalletAddress(address);
|
|
28
28
|
if (ens) {
|
|
29
29
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, { color: 'primary', variant: 'body_normal', truncate: true, children: ens }), jsxRuntime.jsx(Typography.Typography, { weight: 'regular', variant: 'body_small', color: 'secondary', children: shortenAddress })] }));
|
|
30
30
|
}
|
|
@@ -20,7 +20,7 @@ import { Icon } from '../Icon/Icon.js';
|
|
|
20
20
|
const WalletInformationCard = ({ address, ens, balance, icon, network, menu, }) => {
|
|
21
21
|
const { t } = useTranslation();
|
|
22
22
|
const details = useMemo(() => {
|
|
23
|
-
const shortenAddress = shortenWalletAddress(address
|
|
23
|
+
const shortenAddress = shortenWalletAddress(address);
|
|
24
24
|
if (ens) {
|
|
25
25
|
return (jsxs(Fragment, { children: [jsx(Typography, { color: 'primary', variant: 'body_normal', truncate: true, children: ens }), jsx(Typography, { weight: 'regular', variant: 'body_small', color: 'secondary', children: shortenAddress })] }));
|
|
26
26
|
}
|
|
@@ -144,7 +144,7 @@ const DynamicContext = React.createContext(undefined);
|
|
|
144
144
|
/** The context provider itself we only use internally */
|
|
145
145
|
const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, locale: locale$1, enableInstrumentation = false, }) => {
|
|
146
146
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
147
|
-
const { accessDeniedMessagePrimary, accessDeniedMessageSecondary, accessDeniedButton, defaultPhoneInputIso2, apiBaseUrl, coinbaseWalletPreference, detectNewWalletsForLinking = false, enableConnectOnlyFallback = false, deepLinkPreference: deepLinkPreferenceProp = 'native', bridgeChains, cssOverrides, defaultNumberOfWalletsToShow = values.DEFAULT_NUMBER_OF_WALLETS_TO_SHOW, flowNetwork, initialAuthenticationMode = 'connect-and-sign', debugError = false, displaySiweStatement = true, newToWeb3WalletChainMap, enableVisitTrackingOnConnectOnly = true, environmentId, walletsFilter, logLevel = 'WARN', mobileExperience, notInTheListImageUrl, onboardingImageUrl, policiesConsentInnerComponent, customPrivacyPolicy, privacyPolicyUrl, socialMediaLinkText, socialMediaIconUrl, socialMediaUrl, customTermsOfServices, termsOfServiceUrl, toolkitEnabled, siweStatement, shadowDOMEnabled = true, walletConnectors: walletConnectorsProp, socialProvidersFilter, showLockedWalletView = false, walletConnectPreferredChains, walletConnectorExtensions, recommendedWallets, handlers, } = settings$1;
|
|
147
|
+
const { accessDeniedMessagePrimary, accessDeniedMessageSecondary, accessDeniedButton, defaultPhoneInputIso2, apiBaseUrl, coinbaseWalletPreference, detectNewWalletsForLinking = false, enableConnectOnlyFallback = false, deepLinkPreference: deepLinkPreferenceProp = 'native', bridgeChains, cssOverrides, defaultNumberOfWalletsToShow = values.DEFAULT_NUMBER_OF_WALLETS_TO_SHOW, flowNetwork, initialAuthenticationMode = 'connect-and-sign', debugError = false, displaySiweStatement = true, newToWeb3WalletChainMap, enableVisitTrackingOnConnectOnly = true, environmentId, walletsFilter, logLevel = 'WARN', mobileExperience, notInTheListImageUrl, onboardingImageUrl, policiesConsentInnerComponent, customPrivacyPolicy, privacyPolicyUrl, socialMediaLinkText, socialMediaIconUrl, socialMediaUrl, customTermsOfServices, termsOfServiceUrl, toolkitEnabled, siweStatement, shadowDOMEnabled = true, walletConnectors: walletConnectorsProp, socialProvidersFilter, showLockedWalletView = false, walletConnectPreferredChains, walletConnectorExtensions, recommendedWallets, handlers, suppressEndUserConsoleWarning, } = settings$1;
|
|
148
148
|
/**
|
|
149
149
|
* initialize Storage
|
|
150
150
|
*/
|
|
@@ -198,10 +198,10 @@ const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, lo
|
|
|
198
198
|
const { user: user$1, userWithMissingInfo } = user.useUser();
|
|
199
199
|
const isAuthenticated = Boolean(user$1);
|
|
200
200
|
if (user$1) {
|
|
201
|
-
logger$1.logger.
|
|
201
|
+
logger$1.logger.metaData.set('user', user$1);
|
|
202
202
|
}
|
|
203
203
|
else {
|
|
204
|
-
logger$1.logger.
|
|
204
|
+
logger$1.logger.metaData.set('user', undefined);
|
|
205
205
|
}
|
|
206
206
|
const { consumeNonce } = useFetchNonce.useFetchNonce(environmentId);
|
|
207
207
|
const [qrcodeUri, setQrcodeUri] = React.useState('');
|
|
@@ -210,7 +210,10 @@ const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, lo
|
|
|
210
210
|
const { settings: projectSettings$1 } = projectSettings.useProjectSettings();
|
|
211
211
|
useSendDynamicProps.useSendDynamicProps({ environmentId, settings: settings$1 });
|
|
212
212
|
// Console warning for end user safety
|
|
213
|
-
useEndUserWarning.useEndUserWarning({
|
|
213
|
+
useEndUserWarning.useEndUserWarning({
|
|
214
|
+
projectSettings: projectSettings$1,
|
|
215
|
+
suppress: suppressEndUserConsoleWarning,
|
|
216
|
+
});
|
|
214
217
|
const multiWallet = useMultiWallet.useMultiWallet({
|
|
215
218
|
isBridgeFlow,
|
|
216
219
|
multiWalletOverride: (_d = settings$1.overrides) === null || _d === void 0 ? void 0 : _d.multiWallet,
|
|
@@ -140,7 +140,7 @@ const DynamicContext = createContext(undefined);
|
|
|
140
140
|
/** The context provider itself we only use internally */
|
|
141
141
|
const InnerDynamicContextProvider = ({ children, theme, settings, locale, enableInstrumentation = false, }) => {
|
|
142
142
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
143
|
-
const { accessDeniedMessagePrimary, accessDeniedMessageSecondary, accessDeniedButton, defaultPhoneInputIso2, apiBaseUrl, coinbaseWalletPreference, detectNewWalletsForLinking = false, enableConnectOnlyFallback = false, deepLinkPreference: deepLinkPreferenceProp = 'native', bridgeChains, cssOverrides, defaultNumberOfWalletsToShow = DEFAULT_NUMBER_OF_WALLETS_TO_SHOW, flowNetwork, initialAuthenticationMode = 'connect-and-sign', debugError = false, displaySiweStatement = true, newToWeb3WalletChainMap, enableVisitTrackingOnConnectOnly = true, environmentId, walletsFilter, logLevel = 'WARN', mobileExperience, notInTheListImageUrl, onboardingImageUrl, policiesConsentInnerComponent, customPrivacyPolicy, privacyPolicyUrl, socialMediaLinkText, socialMediaIconUrl, socialMediaUrl, customTermsOfServices, termsOfServiceUrl, toolkitEnabled, siweStatement, shadowDOMEnabled = true, walletConnectors: walletConnectorsProp, socialProvidersFilter, showLockedWalletView = false, walletConnectPreferredChains, walletConnectorExtensions, recommendedWallets, handlers, } = settings;
|
|
143
|
+
const { accessDeniedMessagePrimary, accessDeniedMessageSecondary, accessDeniedButton, defaultPhoneInputIso2, apiBaseUrl, coinbaseWalletPreference, detectNewWalletsForLinking = false, enableConnectOnlyFallback = false, deepLinkPreference: deepLinkPreferenceProp = 'native', bridgeChains, cssOverrides, defaultNumberOfWalletsToShow = DEFAULT_NUMBER_OF_WALLETS_TO_SHOW, flowNetwork, initialAuthenticationMode = 'connect-and-sign', debugError = false, displaySiweStatement = true, newToWeb3WalletChainMap, enableVisitTrackingOnConnectOnly = true, environmentId, walletsFilter, logLevel = 'WARN', mobileExperience, notInTheListImageUrl, onboardingImageUrl, policiesConsentInnerComponent, customPrivacyPolicy, privacyPolicyUrl, socialMediaLinkText, socialMediaIconUrl, socialMediaUrl, customTermsOfServices, termsOfServiceUrl, toolkitEnabled, siweStatement, shadowDOMEnabled = true, walletConnectors: walletConnectorsProp, socialProvidersFilter, showLockedWalletView = false, walletConnectPreferredChains, walletConnectorExtensions, recommendedWallets, handlers, suppressEndUserConsoleWarning, } = settings;
|
|
144
144
|
/**
|
|
145
145
|
* initialize Storage
|
|
146
146
|
*/
|
|
@@ -194,10 +194,10 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale, enable
|
|
|
194
194
|
const { user, userWithMissingInfo } = useUser();
|
|
195
195
|
const isAuthenticated = Boolean(user);
|
|
196
196
|
if (user) {
|
|
197
|
-
logger.
|
|
197
|
+
logger.metaData.set('user', user);
|
|
198
198
|
}
|
|
199
199
|
else {
|
|
200
|
-
logger.
|
|
200
|
+
logger.metaData.set('user', undefined);
|
|
201
201
|
}
|
|
202
202
|
const { consumeNonce } = useFetchNonce(environmentId);
|
|
203
203
|
const [qrcodeUri, setQrcodeUri] = useState('');
|
|
@@ -206,7 +206,10 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale, enable
|
|
|
206
206
|
const { settings: projectSettings } = useProjectSettings();
|
|
207
207
|
useSendDynamicProps({ environmentId, settings });
|
|
208
208
|
// Console warning for end user safety
|
|
209
|
-
useEndUserWarning({
|
|
209
|
+
useEndUserWarning({
|
|
210
|
+
projectSettings,
|
|
211
|
+
suppress: suppressEndUserConsoleWarning,
|
|
212
|
+
});
|
|
210
213
|
const multiWallet = useMultiWallet({
|
|
211
214
|
isBridgeFlow,
|
|
212
215
|
multiWalletOverride: (_d = settings.overrides) === null || _d === void 0 ? void 0 : _d.multiWallet,
|
|
@@ -84,6 +84,7 @@ export interface DynamicContextProps {
|
|
|
84
84
|
socialMediaLinkText?: string;
|
|
85
85
|
socialMediaUrl?: string;
|
|
86
86
|
socialProvidersFilter?: SocialProviderFilter;
|
|
87
|
+
suppressEndUserConsoleWarning?: boolean;
|
|
87
88
|
termsOfServiceUrl?: string;
|
|
88
89
|
toolkitEnabled?: boolean;
|
|
89
90
|
walletConnectors?: WalletConnectorsMethod[];
|