@dynamic-labs/sdk-react-core 3.0.0-alpha.50 → 3.0.0-alpha.52
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 +34 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +13 -12
- package/src/lib/components/Typography/Typography.cjs +1 -0
- package/src/lib/components/Typography/Typography.js +1 -0
- package/src/lib/components/Typography/Typography.types.d.ts +1 -1
- package/src/lib/components/TypographyButton/TypographyButton.cjs +2 -1
- package/src/lib/components/TypographyButton/TypographyButton.js +2 -1
- package/src/lib/context/DynamicContext/DynamicContext.cjs +5 -4
- package/src/lib/context/DynamicContext/DynamicContext.js +5 -4
- package/src/lib/context/DynamicContext/hooks/useSelectedWalletConnector/useSelectedWalletConnector.d.ts +1 -1
- package/src/lib/context/DynamicContext/types/SettingsOverrides.d.ts +3 -2
- package/src/lib/context/ViewContext/types/index.d.ts +1 -1
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +1 -0
- package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.js +2 -1
- package/src/lib/locale/en/translation.cjs +24 -0
- package/src/lib/locale/en/translation.d.ts +24 -0
- package/src/lib/locale/en/translation.js +24 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +8 -1
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +8 -1
- package/src/lib/shared/assets/blue-walletconnect.cjs +62 -0
- package/src/lib/shared/assets/blue-walletconnect.js +38 -0
- package/src/lib/shared/assets/index.d.ts +3 -0
- package/src/lib/store/hooks/useNetworkConfigurations/useNetworkConfigurations.cjs +19 -4
- package/src/lib/store/hooks/useNetworkConfigurations/useNetworkConfigurations.d.ts +4 -3
- package/src/lib/store/hooks/useNetworkConfigurations/useNetworkConfigurations.js +19 -4
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +1 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +1 -0
- package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.d.ts +2 -2
- package/src/lib/views/GlobalWalletConfirmView/GlobalWalletConfirmView.cjs +105 -0
- package/src/lib/views/GlobalWalletConfirmView/GlobalWalletConfirmView.d.ts +12 -0
- package/src/lib/views/GlobalWalletConfirmView/GlobalWalletConfirmView.js +100 -0
- package/src/lib/views/GlobalWalletConfirmView/index.d.ts +1 -0
- package/src/lib/views/viewToComponentMap.cjs +2 -0
- package/src/lib/views/viewToComponentMap.d.ts +1 -0
- package/src/lib/views/viewToComponentMap.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +12 -5
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +13 -6
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/DynamicWidgetViews.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/DynamicWidgetViews.js +2 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +2 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.d.ts +3 -1
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.js +2 -1
- package/src/lib/widgets/DynamicWidget/views/GlobalWalletView/GlobalWalletView.cjs +230 -0
- package/src/lib/widgets/DynamicWidget/views/GlobalWalletView/GlobalWalletView.d.ts +3 -0
- package/src/lib/widgets/DynamicWidget/views/GlobalWalletView/GlobalWalletView.js +225 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,38 @@
|
|
|
1
1
|
|
|
2
|
+
## [3.0.0-alpha.52](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.51...v3.0.0-alpha.52) (2024-08-28)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add support for custom keplr chains ([#6635](https://github.com/dynamic-labs/DynamicAuth/issues/6635)) ([f0aa2da](https://github.com/dynamic-labs/DynamicAuth/commit/f0aa2dac2a2b259d145ff52174da7cc6ef963182))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* better error handling on solana transaction decoding ([#6731](https://github.com/dynamic-labs/DynamicAuth/issues/6731)) ([a71af86](https://github.com/dynamic-labs/DynamicAuth/commit/a71af869395c9b99c04f0cac78a73e1b2b17bafe))
|
|
13
|
+
|
|
14
|
+
## [3.0.0-alpha.51](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.50...v3.0.0-alpha.51) (2024-08-23)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### ⚠ BREAKING CHANGES
|
|
18
|
+
|
|
19
|
+
* renamed solana-utils package to solana-core ([#6680](https://github.com/dynamic-labs/DynamicAuth/issues/6680)) ([9178d72](https://github.com/dynamic-labs/DynamicAuth/commit/9178d72073911364d1cb311944abaf0c93ada842))
|
|
20
|
+
* removed rpc-provider-solana package and moved methods and types to solana-core package ([#6694](https://github.com/dynamic-labs/DynamicAuth/issues/6694)) ([3486b01](https://github.com/dynamic-labs/DynamicAuth/commit/3486b018f6b199318e501854093d3eb7575bf9e0))
|
|
21
|
+
* removed rpc-provider-ethereum package and moved methods and types to ethereum-core package ([#6689](https://github.com/dynamic-labs/DynamicAuth/issues/6689)) ([83bf769](https://github.com/dynamic-labs/DynamicAuth/commit/83bf769a733cce484cfbc0aced654b811b1535de))
|
|
22
|
+
* renamed rpc-provider-starknet package to starknet-core ([#6695](https://github.com/dynamic-labs/DynamicAuth/issues/6695)) ([3fc6a03](https://github.com/dynamic-labs/DynamicAuth/commit/3fc6a0327f50914d3c28ca2c7d028046632d0002))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* global wallet sdk ui ([#6626](https://github.com/dynamic-labs/DynamicAuth/issues/6626)) ([e000257](https://github.com/dynamic-labs/DynamicAuth/commit/e0002578eb91597577843c93821318112e36a9f0))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* zerodev sign message ([#6691](https://github.com/dynamic-labs/DynamicAuth/issues/6691)) ([58c7fba](https://github.com/dynamic-labs/DynamicAuth/commit/58c7fba97c42eacad359e2daefd0f8518b8db28b))
|
|
33
|
+
* fix solana transaction optimization endpoint ([#6702](https://github.com/dynamic-labs/DynamicAuth/issues/6702)) ([f14bef7](https://github.com/dynamic-labs/DynamicAuth/commit/f14bef7994c32d66c3020d8c318bdbb5cac8ae94))
|
|
34
|
+
|
|
35
|
+
|
|
2
36
|
## [3.0.0-alpha.50](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.49...v3.0.0-alpha.50) (2024-08-22)
|
|
3
37
|
|
|
4
38
|
## [3.0.0-alpha.49](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.48...v3.0.0-alpha.49) (2024-08-22)
|
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": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.52",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
|
|
@@ -17,17 +17,18 @@
|
|
|
17
17
|
"react-i18next": "13.5.0",
|
|
18
18
|
"yup": "0.32.11",
|
|
19
19
|
"react-international-phone": "4.2.5",
|
|
20
|
-
"@dynamic-labs/ethereum-core": "3.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/
|
|
29
|
-
"@dynamic-labs/
|
|
30
|
-
"@dynamic-labs/wallet-
|
|
20
|
+
"@dynamic-labs/ethereum-core": "3.0.0-alpha.52",
|
|
21
|
+
"@dynamic-labs/global-wallet": "3.0.0-alpha.52",
|
|
22
|
+
"@dynamic-labs/iconic": "3.0.0-alpha.52",
|
|
23
|
+
"@dynamic-labs/logger": "3.0.0-alpha.52",
|
|
24
|
+
"@dynamic-labs/message-transport": "3.0.0-alpha.52",
|
|
25
|
+
"@dynamic-labs/multi-wallet": "3.0.0-alpha.52",
|
|
26
|
+
"@dynamic-labs/rpc-providers": "3.0.0-alpha.52",
|
|
27
|
+
"@dynamic-labs/store": "3.0.0-alpha.52",
|
|
28
|
+
"@dynamic-labs/types": "3.0.0-alpha.52",
|
|
29
|
+
"@dynamic-labs/utils": "3.0.0-alpha.52",
|
|
30
|
+
"@dynamic-labs/wallet-book": "3.0.0-alpha.52",
|
|
31
|
+
"@dynamic-labs/wallet-connector-core": "3.0.0-alpha.52",
|
|
31
32
|
"eventemitter3": "5.0.1"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
@@ -3,7 +3,7 @@ import { CopyKey } from '../../shared';
|
|
|
3
3
|
import { ClassStyleProps } from '../../utils/types';
|
|
4
4
|
export type TypographyTag = ElementType;
|
|
5
5
|
export type TypographyVariant = 'title' | 'body_normal' | 'body_small' | 'body_mini' | 'button_primary' | 'button_secondary' | 'button_tertiary' | 'numbers_big' | 'numbers_medium';
|
|
6
|
-
export type TypographyColor = 'primary' | 'secondary' | 'brand-primary' | 'tertiary' | 'link' | 'error-1' | 'error-2' | 'tooltip' | 'green-1' | 'inherit';
|
|
6
|
+
export type TypographyColor = 'primary' | 'secondary' | 'brand-primary' | 'tertiary' | 'link' | 'error-1' | 'error-2' | 'tooltip' | 'green-1' | 'inherit' | 'white';
|
|
7
7
|
export type TypographyWeight = 'regular' | 'medium' | 'bold';
|
|
8
8
|
export type TypographyTransform = 'uppercase';
|
|
9
9
|
export type TypographyProps<TAG extends ElementType = 'p'> = {
|
|
@@ -9,10 +9,11 @@ var Typography = require('../Typography/Typography.cjs');
|
|
|
9
9
|
var Button = require('../Button/Button.cjs');
|
|
10
10
|
|
|
11
11
|
const TypographyButton = (_a) => {
|
|
12
|
+
var _b;
|
|
12
13
|
var { children, typographyProps = {
|
|
13
14
|
variant: 'button_primary',
|
|
14
15
|
}, copykey } = _a, props = _tslib.__rest(_a, ["children", "typographyProps", "copykey"]);
|
|
15
|
-
return (jsxRuntime.jsx(Button.Button, Object.assign({}, props, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'button_primary',
|
|
16
|
+
return (jsxRuntime.jsx(Button.Button, Object.assign({}, props, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'button_primary', as: 'span' }, typographyProps, { color: (_b = typographyProps.color) !== null && _b !== void 0 ? _b : 'primary', copykey: copykey, children: children })) })));
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
exports.TypographyButton = TypographyButton;
|
|
@@ -5,10 +5,11 @@ import { Typography } from '../Typography/Typography.js';
|
|
|
5
5
|
import { Button } from '../Button/Button.js';
|
|
6
6
|
|
|
7
7
|
const TypographyButton = (_a) => {
|
|
8
|
+
var _b;
|
|
8
9
|
var { children, typographyProps = {
|
|
9
10
|
variant: 'button_primary',
|
|
10
11
|
}, copykey } = _a, props = __rest(_a, ["children", "typographyProps", "copykey"]);
|
|
11
|
-
return (jsx(Button, Object.assign({}, props, { children: jsx(Typography, Object.assign({ variant: 'button_primary',
|
|
12
|
+
return (jsx(Button, Object.assign({}, props, { children: jsx(Typography, Object.assign({ variant: 'button_primary', as: 'span' }, typographyProps, { color: (_b = typographyProps.color) !== null && _b !== void 0 ? _b : 'primary', copykey: copykey, children: children })) })));
|
|
12
13
|
};
|
|
13
14
|
|
|
14
15
|
export { TypographyButton };
|
|
@@ -145,7 +145,7 @@ const PUBLIC_PROJECT_LIVE_ENVIRONMENT_ID = '2762a57b-faa4-41ce-9f16-abff9300e2c9
|
|
|
145
145
|
const DynamicContext = React.createContext(undefined);
|
|
146
146
|
/** The context provider itself we only use internally */
|
|
147
147
|
const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, locale: locale$1, enableInstrumentation = false, }) => {
|
|
148
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
148
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
149
149
|
const { accessDeniedMessagePrimary, accessDeniedMessageSecondary, accessDeniedButton, defaultPhoneInputIso2, apiBaseUrl, coinbaseWalletPreference, 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, signWithEmailWalletName, socialMediaLinkText, socialMediaIconUrl, socialMediaUrl, customTermsOfServices, termsOfServiceUrl, toolkitEnabled, siweStatement, shadowDOMEnabled = true, walletConnectors: walletConnectorsProp, socialProvidersFilter, showLockedWalletView = false, walletConnectPreferredChains, walletConnectorExtensions, recommendedWallets, hideEmbeddedWalletTransactionUIs, handlers, headless = false, } = settings$1;
|
|
150
150
|
localStorage.LocalStorage.setSuffix(settings$1.localStorageSuffix);
|
|
151
151
|
/**
|
|
@@ -227,8 +227,9 @@ const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, lo
|
|
|
227
227
|
const [legacyIsVerifying, setLegacyIsVerifying] = React.useState(false);
|
|
228
228
|
const walletBook$1 = walletBook.useWalletBookCdn();
|
|
229
229
|
const { networkConfigurations: serverNetworkConfigurations } = useNetworkConfigurations.useNetworkConfigurations({
|
|
230
|
+
cosmosNetworkOverrides: (_k = settings$1.overrides) === null || _k === void 0 ? void 0 : _k.cosmosNetworks,
|
|
230
231
|
environmentId,
|
|
231
|
-
evmNetworksOverrides: (
|
|
232
|
+
evmNetworksOverrides: (_l = settings$1.overrides) === null || _l === void 0 ? void 0 : _l.evmNetworks,
|
|
232
233
|
projectSettings,
|
|
233
234
|
});
|
|
234
235
|
const { imageUserInAccessList, imageUserNotInAccessList, displayName, appLogo, } = (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general) || {};
|
|
@@ -240,7 +241,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, lo
|
|
|
240
241
|
appLogoUrl,
|
|
241
242
|
appName,
|
|
242
243
|
getAppOrigin: () => window.location.origin,
|
|
243
|
-
hideEmbeddedWalletTransactionUIs: hideEmbeddedWalletTransactionUIs !== null && hideEmbeddedWalletTransactionUIs !== void 0 ? hideEmbeddedWalletTransactionUIs : !((
|
|
244
|
+
hideEmbeddedWalletTransactionUIs: hideEmbeddedWalletTransactionUIs !== null && hideEmbeddedWalletTransactionUIs !== void 0 ? hideEmbeddedWalletTransactionUIs : !((_o = (_m = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _m === void 0 ? void 0 : _m.embeddedWallets) === null || _o === void 0 ? void 0 : _o.showEmbeddedWalletActionsUI),
|
|
244
245
|
});
|
|
245
246
|
const { walletConnectorOptions } = useWalletConnectorOptions.useWalletConnectorOptions({
|
|
246
247
|
appLogoUrl,
|
|
@@ -717,7 +718,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, lo
|
|
|
717
718
|
}
|
|
718
719
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
719
720
|
}, [multiWallet, multiWalletWidgetState, showDynamicUserProfile]);
|
|
720
|
-
return (jsxRuntime.jsx(reactI18next.I18nextProvider, { i18n: i18nSDKInstance, children: jsxRuntime.jsx(DynamicContext.Provider, { value: value, children: jsxRuntime.jsx(walletBook.WalletBookContextProvider, { walletBook: walletBook$1, children: jsxRuntime.jsx(ThemeContext.ThemeContextProvider, { customerTheme: parseTheme.parseTheme(theme, ((
|
|
721
|
+
return (jsxRuntime.jsx(reactI18next.I18nextProvider, { i18n: i18nSDKInstance, children: jsxRuntime.jsx(DynamicContext.Provider, { value: value, children: jsxRuntime.jsx(walletBook.WalletBookContextProvider, { walletBook: walletBook$1, children: jsxRuntime.jsx(ThemeContext.ThemeContextProvider, { customerTheme: parseTheme.parseTheme(theme, ((_p = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design) === null || _p === void 0 ? void 0 : _p.modal) || undefined), designSettings: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design, children: jsxRuntime.jsx(LoadingContext.LoadingContextProvider, { children: jsxRuntime.jsxs(ViewContext.ViewContextProvider, { initialView: helpers.getInitialView({
|
|
721
722
|
bridgeOnboardingCompleted,
|
|
722
723
|
connectedWallets,
|
|
723
724
|
isAuthenticated: isAuthenticated || Boolean(primaryWallet),
|
|
@@ -141,7 +141,7 @@ const PUBLIC_PROJECT_LIVE_ENVIRONMENT_ID = '2762a57b-faa4-41ce-9f16-abff9300e2c9
|
|
|
141
141
|
const DynamicContext = createContext(undefined);
|
|
142
142
|
/** The context provider itself we only use internally */
|
|
143
143
|
const InnerDynamicContextProvider = ({ children, theme, settings, locale, enableInstrumentation = false, }) => {
|
|
144
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
144
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
145
145
|
const { accessDeniedMessagePrimary, accessDeniedMessageSecondary, accessDeniedButton, defaultPhoneInputIso2, apiBaseUrl, coinbaseWalletPreference, 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, signWithEmailWalletName, socialMediaLinkText, socialMediaIconUrl, socialMediaUrl, customTermsOfServices, termsOfServiceUrl, toolkitEnabled, siweStatement, shadowDOMEnabled = true, walletConnectors: walletConnectorsProp, socialProvidersFilter, showLockedWalletView = false, walletConnectPreferredChains, walletConnectorExtensions, recommendedWallets, hideEmbeddedWalletTransactionUIs, handlers, headless = false, } = settings;
|
|
146
146
|
LocalStorage.setSuffix(settings.localStorageSuffix);
|
|
147
147
|
/**
|
|
@@ -223,8 +223,9 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale, enable
|
|
|
223
223
|
const [legacyIsVerifying, setLegacyIsVerifying] = useState(false);
|
|
224
224
|
const walletBook = useWalletBookCdn();
|
|
225
225
|
const { networkConfigurations: serverNetworkConfigurations } = useNetworkConfigurations({
|
|
226
|
+
cosmosNetworkOverrides: (_k = settings.overrides) === null || _k === void 0 ? void 0 : _k.cosmosNetworks,
|
|
226
227
|
environmentId,
|
|
227
|
-
evmNetworksOverrides: (
|
|
228
|
+
evmNetworksOverrides: (_l = settings.overrides) === null || _l === void 0 ? void 0 : _l.evmNetworks,
|
|
228
229
|
projectSettings,
|
|
229
230
|
});
|
|
230
231
|
const { imageUserInAccessList, imageUserNotInAccessList, displayName, appLogo, } = (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general) || {};
|
|
@@ -236,7 +237,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale, enable
|
|
|
236
237
|
appLogoUrl,
|
|
237
238
|
appName,
|
|
238
239
|
getAppOrigin: () => window.location.origin,
|
|
239
|
-
hideEmbeddedWalletTransactionUIs: hideEmbeddedWalletTransactionUIs !== null && hideEmbeddedWalletTransactionUIs !== void 0 ? hideEmbeddedWalletTransactionUIs : !((
|
|
240
|
+
hideEmbeddedWalletTransactionUIs: hideEmbeddedWalletTransactionUIs !== null && hideEmbeddedWalletTransactionUIs !== void 0 ? hideEmbeddedWalletTransactionUIs : !((_o = (_m = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _m === void 0 ? void 0 : _m.embeddedWallets) === null || _o === void 0 ? void 0 : _o.showEmbeddedWalletActionsUI),
|
|
240
241
|
});
|
|
241
242
|
const { walletConnectorOptions } = useWalletConnectorOptions({
|
|
242
243
|
appLogoUrl,
|
|
@@ -713,7 +714,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale, enable
|
|
|
713
714
|
}
|
|
714
715
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
715
716
|
}, [multiWallet, multiWalletWidgetState, showDynamicUserProfile]);
|
|
716
|
-
return (jsx(I18nextProvider, { i18n: i18nSDKInstance, children: jsx(DynamicContext.Provider, { value: value, children: jsx(WalletBookContextProvider, { walletBook: walletBook, children: jsx(ThemeContextProvider, { customerTheme: parseTheme(theme, ((
|
|
717
|
+
return (jsx(I18nextProvider, { i18n: i18nSDKInstance, children: jsx(DynamicContext.Provider, { value: value, children: jsx(WalletBookContextProvider, { walletBook: walletBook, children: jsx(ThemeContextProvider, { customerTheme: parseTheme(theme, ((_p = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design) === null || _p === void 0 ? void 0 : _p.modal) || undefined), designSettings: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design, children: jsx(LoadingContextProvider, { children: jsxs(ViewContextProvider, { initialView: getInitialView({
|
|
717
718
|
bridgeOnboardingCompleted,
|
|
718
719
|
connectedWallets,
|
|
719
720
|
isAuthenticated: isAuthenticated || Boolean(primaryWallet),
|
|
@@ -4,7 +4,7 @@ type useSelectedWalletConnectorProps = {
|
|
|
4
4
|
walletConnectorOptions: WalletOption[];
|
|
5
5
|
};
|
|
6
6
|
export declare const useSelectedWalletConnector: ({ walletConnectorOptions, }: useSelectedWalletConnectorProps) => {
|
|
7
|
-
selectedWalletConnector: import("
|
|
7
|
+
selectedWalletConnector: import("@dynamic-labs/wallet-connector-core").WalletConnectorCore.WalletConnector | null;
|
|
8
8
|
setSelectedWalletConnectorKey: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
9
9
|
};
|
|
10
10
|
export {};
|
|
@@ -9,7 +9,7 @@ export type WalletListViewSettings = {
|
|
|
9
9
|
items: WalletListViewTabItem[];
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
export type
|
|
12
|
+
export type NetworksOverrides = GenericNetwork[] | ((dashboardNetworks: GenericNetwork[]) => GenericNetwork[]);
|
|
13
13
|
export type ViewsOverrides = SdkView | WalletListViewSettings;
|
|
14
14
|
export type SettingsOverrides = {
|
|
15
15
|
views?: Array<ViewsOverrides>;
|
|
@@ -22,7 +22,8 @@ export type SettingsOverrides = {
|
|
|
22
22
|
* WARNING: this callback must be memoized as it will be used in a dependency array to ensure
|
|
23
23
|
* the SDK can react to this value changing (for ex, toggling a chain off).
|
|
24
24
|
*/
|
|
25
|
-
evmNetworks?:
|
|
25
|
+
evmNetworks?: NetworksOverrides;
|
|
26
|
+
cosmosNetworks?: NetworksOverrides;
|
|
26
27
|
/**
|
|
27
28
|
* Allows overriding the multi-wallet feature from the dashboard.
|
|
28
29
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { viewToComponentMap } from '../../../views/viewToComponentMap';
|
|
3
|
-
export type ViewType = 'access-blocked' | 'select-hardware-wallet' | 'captcha' | 'chainalysis-blocked-wallet' | 'collect-user-data' | 'collect-user-data-login-no-wallet' | 'login-with-email-or-wallet-full-wallet-list' | 'login-with-email-or-wallet' | 'login-with-wallet-only' | 'login-with-email-verification' | 'login-with-sms-verification' | 'network-not-supported' | 'network-not-supported-manual' | 'no-access' | 'no-qr-not-installed' | 'pending-connect' | 'pending-signature-without-back-button' | 'pending-signature' | 'qr-code' | 'verify-email' | 'verify-sms' | 'wallet-connect-mobile-wallets-list' | 'wallet-list' | 'sandbox-maximum-threshold-reached' | 'multi-wallet-wallet-list' | 'wallet-sign' | 'wallet-used' | 'wallet-group' | 'select-wallet-in-wallet-group' | 'wait-for-email-confirmation-view' | 'email-wallet-otp-verification-view' | 'social-redirect-view' | 'wallet-locked-view' | 'social-wrong-account' | 'gate-blocked-wallet' | 'bridge-welcome' | 'bridge-summary' | 'bridge-next-wallet-connection' | 'account-exists' | 'merge-user-accounts' | 'merge-user-accounts-conflicts' | 'merge-user-accounts-with-same-email' | 'mfa-choose-device' | 'mfa-recovery' | 'mfa-secure-device' | 'mfa-secure-device-help' | 'mfa-verification' | 'mfa-display-backup-codes' | 'wallet-cannot-be-transferred' | 'passkey-intro' | 'passkey-recovery-add-email' | 'passkey-recovery-start' | 'passkey-recovery-bundle' | 'passkey-recovery-complete' | 'passkey-new-domain-detected' | 'embedded-reveal-view' | 'embedded-reveal-account-view' | 'embedded-wallet-auth-choice' | 'rename-passkey' | 'wallet-redirect-view' | 'create-password-view' | 'wallet-claim-intro' | 'farcaster-connect-view';
|
|
3
|
+
export type ViewType = 'access-blocked' | 'select-hardware-wallet' | 'captcha' | 'chainalysis-blocked-wallet' | 'collect-user-data' | 'collect-user-data-login-no-wallet' | 'login-with-email-or-wallet-full-wallet-list' | 'login-with-email-or-wallet' | 'login-with-wallet-only' | 'login-with-email-verification' | 'login-with-sms-verification' | 'network-not-supported' | 'network-not-supported-manual' | 'no-access' | 'no-qr-not-installed' | 'pending-connect' | 'pending-signature-without-back-button' | 'pending-signature' | 'qr-code' | 'verify-email' | 'verify-sms' | 'wallet-connect-mobile-wallets-list' | 'wallet-list' | 'sandbox-maximum-threshold-reached' | 'multi-wallet-wallet-list' | 'wallet-sign' | 'wallet-used' | 'wallet-group' | 'select-wallet-in-wallet-group' | 'wait-for-email-confirmation-view' | 'email-wallet-otp-verification-view' | 'social-redirect-view' | 'wallet-locked-view' | 'social-wrong-account' | 'gate-blocked-wallet' | 'bridge-welcome' | 'bridge-summary' | 'bridge-next-wallet-connection' | 'account-exists' | 'merge-user-accounts' | 'merge-user-accounts-conflicts' | 'merge-user-accounts-with-same-email' | 'mfa-choose-device' | 'mfa-recovery' | 'mfa-secure-device' | 'mfa-secure-device-help' | 'mfa-verification' | 'mfa-display-backup-codes' | 'wallet-cannot-be-transferred' | 'passkey-intro' | 'passkey-recovery-add-email' | 'global-wallet-confirm' | 'passkey-recovery-start' | 'passkey-recovery-bundle' | 'passkey-recovery-complete' | 'passkey-new-domain-detected' | 'embedded-reveal-view' | 'embedded-reveal-account-view' | 'embedded-wallet-auth-choice' | 'rename-passkey' | 'wallet-redirect-view' | 'create-password-view' | 'wallet-claim-intro' | 'farcaster-connect-view';
|
|
4
4
|
export type ViewMapConstraint = Record<ViewType, FC<any>>;
|
|
5
5
|
type ComponentProps<T extends FC<any>> = T extends FC<infer P> ? P : never;
|
|
6
6
|
export type ViewMap = typeof viewToComponentMap;
|
|
@@ -102,6 +102,7 @@ const shouldNotRenderHeaderViews = [
|
|
|
102
102
|
...DynamicWidgetContext_types.DynamicTransactionsWidgetViews,
|
|
103
103
|
...DynamicWidgetContext_types.DynamicMfaWidgetViews,
|
|
104
104
|
...DynamicWidgetContext_types.DynamicSettingsViews,
|
|
105
|
+
...DynamicWidgetContext_types.DynamicGlobalWalletViews,
|
|
105
106
|
];
|
|
106
107
|
const DynamicUserProfileLayout = ({ variant, className, style, }) => {
|
|
107
108
|
const { multiWallet } = useInternalDynamicContext.useInternalDynamicContext();
|
|
@@ -77,7 +77,7 @@ import '@dynamic-labs/ethereum-core';
|
|
|
77
77
|
import { MemoizedDynamicWidgetHeader } from '../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
78
78
|
import { DynamicWidgetPrompts } from '../../widgets/DynamicWidget/components/DynamicWidgetPrompts/DynamicWidgetPrompts.js';
|
|
79
79
|
import { DynamicWidgetViews } from '../../widgets/DynamicWidget/components/DynamicWidgetViews/DynamicWidgetViews.js';
|
|
80
|
-
import { DynamicPasskeyWidgetViews, DynamicTransactionsWidgetViews, DynamicMfaWidgetViews, DynamicSettingsViews } from '../../widgets/DynamicWidget/context/DynamicWidgetContext.types.js';
|
|
80
|
+
import { DynamicPasskeyWidgetViews, DynamicTransactionsWidgetViews, DynamicMfaWidgetViews, DynamicSettingsViews, DynamicGlobalWalletViews } from '../../widgets/DynamicWidget/context/DynamicWidgetContext.types.js';
|
|
81
81
|
import { BottomNavBar } from '../../widgets/DynamicWidget/components/BottomNavBar/BottomNavBar.js';
|
|
82
82
|
import '../../views/TransactionConfirmationView/helpers/transactionErrorMessage.js';
|
|
83
83
|
import '../../../polyfills.js';
|
|
@@ -98,6 +98,7 @@ const shouldNotRenderHeaderViews = [
|
|
|
98
98
|
...DynamicTransactionsWidgetViews,
|
|
99
99
|
...DynamicMfaWidgetViews,
|
|
100
100
|
...DynamicSettingsViews,
|
|
101
|
+
...DynamicGlobalWalletViews,
|
|
101
102
|
];
|
|
102
103
|
const DynamicUserProfileLayout = ({ variant, className, style, }) => {
|
|
103
104
|
const { multiWallet } = useInternalDynamicContext();
|
|
@@ -874,6 +874,30 @@ const translation = {
|
|
|
874
874
|
title: 'Settings',
|
|
875
875
|
button_logout: 'Log out',
|
|
876
876
|
},
|
|
877
|
+
global_wallet: {
|
|
878
|
+
confirm: {
|
|
879
|
+
title: 'Confirm Connection',
|
|
880
|
+
description: 'Are you sure you want to connect to {{name}}?',
|
|
881
|
+
cancel_button: 'Cancel',
|
|
882
|
+
connect_button: 'Connect',
|
|
883
|
+
},
|
|
884
|
+
banner: {
|
|
885
|
+
warning: 'There was an error connecting to {{name}}.',
|
|
886
|
+
success: 'Successfully connected to {{name}}.',
|
|
887
|
+
already_connected: 'You are already connected to {{name}}.',
|
|
888
|
+
expired: 'The link you entered expired, please get a new URI from the app.',
|
|
889
|
+
bad_input: 'Invalid URI. Please check below for how to find the valid URI.',
|
|
890
|
+
},
|
|
891
|
+
help: {
|
|
892
|
+
title: 'How do I find the URI code?',
|
|
893
|
+
step: {
|
|
894
|
+
1: '1. Go to the website you want to connect to',
|
|
895
|
+
2: '2. Locate the "Connect" or "Login" button',
|
|
896
|
+
3: '3. Open WalletConnect from the list',
|
|
897
|
+
},
|
|
898
|
+
learn_more: 'Learn more about global wallets',
|
|
899
|
+
},
|
|
900
|
+
},
|
|
877
901
|
/**
|
|
878
902
|
* @description copy keys for mfa management view
|
|
879
903
|
* @default
|
|
@@ -870,6 +870,30 @@ export declare const translation: {
|
|
|
870
870
|
title: string;
|
|
871
871
|
button_logout: string;
|
|
872
872
|
};
|
|
873
|
+
global_wallet: {
|
|
874
|
+
confirm: {
|
|
875
|
+
title: string;
|
|
876
|
+
description: string;
|
|
877
|
+
cancel_button: string;
|
|
878
|
+
connect_button: string;
|
|
879
|
+
};
|
|
880
|
+
banner: {
|
|
881
|
+
warning: string;
|
|
882
|
+
success: string;
|
|
883
|
+
already_connected: string;
|
|
884
|
+
expired: string;
|
|
885
|
+
bad_input: string;
|
|
886
|
+
};
|
|
887
|
+
help: {
|
|
888
|
+
title: string;
|
|
889
|
+
step: {
|
|
890
|
+
1: string;
|
|
891
|
+
2: string;
|
|
892
|
+
3: string;
|
|
893
|
+
};
|
|
894
|
+
learn_more: string;
|
|
895
|
+
};
|
|
896
|
+
};
|
|
873
897
|
/**
|
|
874
898
|
* @description copy keys for mfa management view
|
|
875
899
|
* @default
|
|
@@ -870,6 +870,30 @@ const translation = {
|
|
|
870
870
|
title: 'Settings',
|
|
871
871
|
button_logout: 'Log out',
|
|
872
872
|
},
|
|
873
|
+
global_wallet: {
|
|
874
|
+
confirm: {
|
|
875
|
+
title: 'Confirm Connection',
|
|
876
|
+
description: 'Are you sure you want to connect to {{name}}?',
|
|
877
|
+
cancel_button: 'Cancel',
|
|
878
|
+
connect_button: 'Connect',
|
|
879
|
+
},
|
|
880
|
+
banner: {
|
|
881
|
+
warning: 'There was an error connecting to {{name}}.',
|
|
882
|
+
success: 'Successfully connected to {{name}}.',
|
|
883
|
+
already_connected: 'You are already connected to {{name}}.',
|
|
884
|
+
expired: 'The link you entered expired, please get a new URI from the app.',
|
|
885
|
+
bad_input: 'Invalid URI. Please check below for how to find the valid URI.',
|
|
886
|
+
},
|
|
887
|
+
help: {
|
|
888
|
+
title: 'How do I find the URI code?',
|
|
889
|
+
step: {
|
|
890
|
+
1: '1. Go to the website you want to connect to',
|
|
891
|
+
2: '2. Locate the "Connect" or "Login" button',
|
|
892
|
+
3: '3. Open WalletConnect from the list',
|
|
893
|
+
},
|
|
894
|
+
learn_more: 'Learn more about global wallets',
|
|
895
|
+
},
|
|
896
|
+
},
|
|
873
897
|
/**
|
|
874
898
|
* @description copy keys for mfa management view
|
|
875
899
|
* @default
|
|
@@ -191,7 +191,14 @@ const SignMessageConfirmationModal = ({ appLogoUrl, appName, appOrigin, message,
|
|
|
191
191
|
const closeButton = (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: handleOnReject, "data-testid": 'close', disabled: isLoading, children: jsxRuntime.jsx(close.ReactComponent, {}) }));
|
|
192
192
|
return hideModal ? null : (jsxRuntime.jsx(Portal.Portal, { handleClose: handleOnReject, isShown: show, zIndex: index.authModalZIndex, withBackdrop: true, elementId: 'dynamic-sign-message', transitionEvents: {
|
|
193
193
|
onUnmount: handleOnModalUnmount,
|
|
194
|
-
}, children: jsxRuntime.jsx(Modal.Modal, { children: jsxRuntime.jsxs(ModalCard.ModalCard, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: closeButton, alignContent: 'bottom', children: jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: (props) => (jsxRuntime.jsx(Icon.Icon, { color: 'brand-primary', children: jsxRuntime.jsx(signCircle.ReactComponent, Object.assign({}, props)) })), iconSize: 64, isSpinning: true }) }), jsxRuntime.jsx(PasskeyCreatedSuccessBanner.PasskeyCreatedSuccessBanner, {}), jsxRuntime.jsxs("div", { className: 'sign-message-confirmation__body', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', className: 'sign-message-confirmation__title', copykey: 'dyn_sign_message.title', children: t('dyn_sign_message.title') }), jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}), children: signMessageError && (jsxRuntime.jsx("div", { className: 'sign-message-confirmation__error', children: jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: errorText }) })) }), jsxRuntime.jsxs("div", { className: 'sign-message-confirmation__message-container', children: [jsxRuntime.jsx(AppOriginTile.AppOriginTile, { appLogoUrl: appLogoUrl, appName: appName, appOrigin: appOrigin }), jsxRuntime.jsx("div", { className: 'sign-message-confirmation__message', children: jsxRuntime.jsx(SignMessagePreview.SignMessagePreview
|
|
194
|
+
}, children: jsxRuntime.jsx(Modal.Modal, { children: jsxRuntime.jsxs(ModalCard.ModalCard, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: closeButton, alignContent: 'bottom', children: jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: (props) => (jsxRuntime.jsx(Icon.Icon, { color: 'brand-primary', children: jsxRuntime.jsx(signCircle.ReactComponent, Object.assign({}, props)) })), iconSize: 64, isSpinning: true }) }), jsxRuntime.jsx(PasskeyCreatedSuccessBanner.PasskeyCreatedSuccessBanner, {}), jsxRuntime.jsxs("div", { className: 'sign-message-confirmation__body', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', className: 'sign-message-confirmation__title', copykey: 'dyn_sign_message.title', children: t('dyn_sign_message.title') }), jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}), children: signMessageError && (jsxRuntime.jsx("div", { className: 'sign-message-confirmation__error', children: jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: errorText }) })) }), jsxRuntime.jsxs("div", { className: 'sign-message-confirmation__message-container', children: [jsxRuntime.jsx(AppOriginTile.AppOriginTile, { appLogoUrl: appLogoUrl, appName: appName, appOrigin: appOrigin }), jsxRuntime.jsx("div", { className: 'sign-message-confirmation__message', children: jsxRuntime.jsx(SignMessagePreview.SignMessagePreview
|
|
195
|
+
// strip if entire message is a quote and replace escaped newlines
|
|
196
|
+
, {
|
|
197
|
+
// strip if entire message is a quote and replace escaped newlines
|
|
198
|
+
message: message
|
|
199
|
+
.toString()
|
|
200
|
+
.replace(/^"(.*)"$/, '$1')
|
|
201
|
+
.replace(/\\n/g, '\n') }) })] }), jsxRuntime.jsxs("div", { className: 'sign-message-confirmation__actions', children: [jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonVariant: 'secondary', onClick: handleOnReject, expanded: true, buttonPadding: 'large', disabled: isLoading, copykey: 'dyn_sign_message.cancel_button', children: t('dyn_sign_message.cancel_button') }), jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonVariant: 'primary', buttonPadding: 'large', onClick: handleMessageSign, expanded: true, loading: isLoading, copykey: 'dyn_sign_message.sign_button', dataTestId: 'sign-button', children: t('dyn_sign_message.sign_button') })] }), jsxRuntime.jsx(NeedHelpSection.NeedHelpSection, {}), jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, {})] })] }) }) }));
|
|
195
202
|
};
|
|
196
203
|
|
|
197
204
|
exports.SignMessageConfirmationModal = SignMessageConfirmationModal;
|
|
@@ -187,7 +187,14 @@ const SignMessageConfirmationModal = ({ appLogoUrl, appName, appOrigin, message,
|
|
|
187
187
|
const closeButton = (jsx(IconButton, { type: 'button', onClick: handleOnReject, "data-testid": 'close', disabled: isLoading, children: jsx(SvgClose, {}) }));
|
|
188
188
|
return hideModal ? null : (jsx(Portal, { handleClose: handleOnReject, isShown: show, zIndex: authModalZIndex, withBackdrop: true, elementId: 'dynamic-sign-message', transitionEvents: {
|
|
189
189
|
onUnmount: handleOnModalUnmount,
|
|
190
|
-
}, children: jsx(Modal, { children: jsxs(ModalCard, { children: [jsx(ModalHeader, { trailing: closeButton, alignContent: 'bottom', children: jsx(IconWithSpinner, { Icon: (props) => (jsx(Icon, { color: 'brand-primary', children: jsx(SvgSignCircle, Object.assign({}, props)) })), iconSize: 64, isSpinning: true }) }), jsx(PasskeyCreatedSuccessBanner, {}), jsxs("div", { className: 'sign-message-confirmation__body', children: [jsx(Typography, { variant: 'title', color: 'primary', className: 'sign-message-confirmation__title', copykey: 'dyn_sign_message.title', children: t('dyn_sign_message.title') }), jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, {}), children: signMessageError && (jsx("div", { className: 'sign-message-confirmation__error', children: jsx(ErrorContainer, { children: errorText }) })) }), jsxs("div", { className: 'sign-message-confirmation__message-container', children: [jsx(AppOriginTile, { appLogoUrl: appLogoUrl, appName: appName, appOrigin: appOrigin }), jsx("div", { className: 'sign-message-confirmation__message', children: jsx(SignMessagePreview
|
|
190
|
+
}, children: jsx(Modal, { children: jsxs(ModalCard, { children: [jsx(ModalHeader, { trailing: closeButton, alignContent: 'bottom', children: jsx(IconWithSpinner, { Icon: (props) => (jsx(Icon, { color: 'brand-primary', children: jsx(SvgSignCircle, Object.assign({}, props)) })), iconSize: 64, isSpinning: true }) }), jsx(PasskeyCreatedSuccessBanner, {}), jsxs("div", { className: 'sign-message-confirmation__body', children: [jsx(Typography, { variant: 'title', color: 'primary', className: 'sign-message-confirmation__title', copykey: 'dyn_sign_message.title', children: t('dyn_sign_message.title') }), jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, {}), children: signMessageError && (jsx("div", { className: 'sign-message-confirmation__error', children: jsx(ErrorContainer, { children: errorText }) })) }), jsxs("div", { className: 'sign-message-confirmation__message-container', children: [jsx(AppOriginTile, { appLogoUrl: appLogoUrl, appName: appName, appOrigin: appOrigin }), jsx("div", { className: 'sign-message-confirmation__message', children: jsx(SignMessagePreview
|
|
191
|
+
// strip if entire message is a quote and replace escaped newlines
|
|
192
|
+
, {
|
|
193
|
+
// strip if entire message is a quote and replace escaped newlines
|
|
194
|
+
message: message
|
|
195
|
+
.toString()
|
|
196
|
+
.replace(/^"(.*)"$/, '$1')
|
|
197
|
+
.replace(/\\n/g, '\n') }) })] }), jsxs("div", { className: 'sign-message-confirmation__actions', children: [jsx(TypographyButton, { buttonVariant: 'secondary', onClick: handleOnReject, expanded: true, buttonPadding: 'large', disabled: isLoading, copykey: 'dyn_sign_message.cancel_button', children: t('dyn_sign_message.cancel_button') }), jsx(TypographyButton, { buttonVariant: 'primary', buttonPadding: 'large', onClick: handleMessageSign, expanded: true, loading: isLoading, copykey: 'dyn_sign_message.sign_button', dataTestId: 'sign-button', children: t('dyn_sign_message.sign_button') })] }), jsx(NeedHelpSection, {}), jsx(PoweredByDynamic, {})] })] }) }) }));
|
|
191
198
|
};
|
|
192
199
|
|
|
193
200
|
export { SignMessageConfirmationModal };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var React = require('react');
|
|
7
|
+
|
|
8
|
+
function _interopNamespace(e) {
|
|
9
|
+
if (e && e.__esModule) return e;
|
|
10
|
+
var n = Object.create(null);
|
|
11
|
+
if (e) {
|
|
12
|
+
Object.keys(e).forEach(function (k) {
|
|
13
|
+
if (k !== 'default') {
|
|
14
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return e[k]; }
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
n["default"] = e;
|
|
23
|
+
return Object.freeze(n);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
27
|
+
|
|
28
|
+
var _g, _defs;
|
|
29
|
+
var _excluded = ["title", "titleId"];
|
|
30
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
31
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
32
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
33
|
+
var SvgBlueWalletconnect = function SvgBlueWalletconnect(_ref) {
|
|
34
|
+
var title = _ref.title,
|
|
35
|
+
titleId = _ref.titleId,
|
|
36
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
37
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
38
|
+
width: 12,
|
|
39
|
+
height: 12,
|
|
40
|
+
viewBox: "0 0 12 12",
|
|
41
|
+
fill: "none",
|
|
42
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
43
|
+
"aria-labelledby": titleId
|
|
44
|
+
}, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
|
|
45
|
+
id: titleId
|
|
46
|
+
}, title) : null, _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
|
|
47
|
+
clipPath: "url(#blue-walletconnect_svg__a)"
|
|
48
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
49
|
+
d: "M6 12A6 6 0 1 0 6 0a6 6 0 0 0 0 12Z",
|
|
50
|
+
fill: "#4084ED"
|
|
51
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
52
|
+
d: "M3.343 4.286a3.761 3.761 0 0 1 5.314 0l.176.176a.186.186 0 0 1 0 .265l-.603.603a.096.096 0 0 1-.133 0l-.243-.244a2.624 2.624 0 0 0-3.708 0l-.26.26a.096.096 0 0 1-.132 0l-.606-.6a.186.186 0 0 1 0-.266l.195-.194Zm6.563 1.248.538.537a.185.185 0 0 1 0 .265L8.018 8.757a.187.187 0 0 1-.264 0L6.034 7.04a.047.047 0 0 0-.068 0l-1.72 1.718a.187.187 0 0 1-.264 0l-2.426-2.42a.186.186 0 0 1 0-.266l.538-.537a.187.187 0 0 1 .265 0l1.72 1.718a.047.047 0 0 0 .067 0l1.72-1.718a.187.187 0 0 1 .265 0l1.72 1.718a.047.047 0 0 0 .068 0l1.72-1.718a.19.19 0 0 1 .267 0Z",
|
|
53
|
+
fill: "#fff"
|
|
54
|
+
}))), _defs || (_defs = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
55
|
+
id: "blue-walletconnect_svg__a"
|
|
56
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
57
|
+
fill: "#fff",
|
|
58
|
+
d: "M0 0h12v12H0z"
|
|
59
|
+
})))));
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
exports.ReactComponent = SvgBlueWalletconnect;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
var _g, _defs;
|
|
5
|
+
var _excluded = ["title", "titleId"];
|
|
6
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
7
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
8
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
9
|
+
var SvgBlueWalletconnect = function SvgBlueWalletconnect(_ref) {
|
|
10
|
+
var title = _ref.title,
|
|
11
|
+
titleId = _ref.titleId,
|
|
12
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
13
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
14
|
+
width: 12,
|
|
15
|
+
height: 12,
|
|
16
|
+
viewBox: "0 0 12 12",
|
|
17
|
+
fill: "none",
|
|
18
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
19
|
+
"aria-labelledby": titleId
|
|
20
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
21
|
+
id: titleId
|
|
22
|
+
}, title) : null, _g || (_g = /*#__PURE__*/React.createElement("g", {
|
|
23
|
+
clipPath: "url(#blue-walletconnect_svg__a)"
|
|
24
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
25
|
+
d: "M6 12A6 6 0 1 0 6 0a6 6 0 0 0 0 12Z",
|
|
26
|
+
fill: "#4084ED"
|
|
27
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
28
|
+
d: "M3.343 4.286a3.761 3.761 0 0 1 5.314 0l.176.176a.186.186 0 0 1 0 .265l-.603.603a.096.096 0 0 1-.133 0l-.243-.244a2.624 2.624 0 0 0-3.708 0l-.26.26a.096.096 0 0 1-.132 0l-.606-.6a.186.186 0 0 1 0-.266l.195-.194Zm6.563 1.248.538.537a.185.185 0 0 1 0 .265L8.018 8.757a.187.187 0 0 1-.264 0L6.034 7.04a.047.047 0 0 0-.068 0l-1.72 1.718a.187.187 0 0 1-.264 0l-2.426-2.42a.186.186 0 0 1 0-.266l.538-.537a.187.187 0 0 1 .265 0l1.72 1.718a.047.047 0 0 0 .067 0l1.72-1.718a.187.187 0 0 1 .265 0l1.72 1.718a.047.047 0 0 0 .068 0l1.72-1.718a.19.19 0 0 1 .267 0Z",
|
|
29
|
+
fill: "#fff"
|
|
30
|
+
}))), _defs || (_defs = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
31
|
+
id: "blue-walletconnect_svg__a"
|
|
32
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
33
|
+
fill: "#fff",
|
|
34
|
+
d: "M0 0h12v12H0z"
|
|
35
|
+
})))));
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export { SvgBlueWalletconnect as ReactComponent };
|
|
@@ -32,12 +32,15 @@ export { ReactComponent as ExportPrivateKeyIcon } from './export-private-key.svg
|
|
|
32
32
|
export { ReactComponent as ExportRecoveryPhraseIcon } from './export-recovery-phrase.svg';
|
|
33
33
|
export { ReactComponent as ExternalLinkIcon } from './externalLink.svg';
|
|
34
34
|
export { ReactComponent as EyeOffIcon } from './eye-off-icon.svg';
|
|
35
|
+
export { ReactComponent as ArrowCircleRight } from './arrow-circle-right.svg';
|
|
35
36
|
export { ReactComponent as FaceIdIcon } from './face-id.svg';
|
|
37
|
+
export { ReactComponent as GlobalWalletIcon } from './global-wallet-icon.svg';
|
|
36
38
|
export { ReactComponent as EyeIcon } from './footer-eye-icon.svg';
|
|
37
39
|
export { ReactComponent as GasIcon } from './footer-gas-icon.svg';
|
|
38
40
|
export { ReactComponent as InfoIcon } from './footer-info-icon.svg';
|
|
39
41
|
export { ReactComponent as KeyIcon } from './footer-key-icon.svg';
|
|
40
42
|
export { ReactComponent as GearIcon } from './gear.svg';
|
|
43
|
+
export { ReactComponent as BlueWalletConnectIcon } from './blue-walletconnect.svg';
|
|
41
44
|
export { ReactComponent as InfoWarningIcon } from './info.svg';
|
|
42
45
|
export { ReactComponent as IPhoneFaceId } from './iphone-face-id.svg';
|
|
43
46
|
export { ReactComponent as IPhoneTouchId } from './iphone-touch-id.svg';
|