@dynamic-labs/sdk-react-core 2.1.2 → 2.1.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 +15 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +13 -13
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +1 -1
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +1 -1
- package/src/lib/components/SignMessagePreview/SignMessagePreview.cjs +13 -5
- package/src/lib/components/SignMessagePreview/SignMessagePreview.js +13 -5
- package/src/lib/components/SignMessagePreview/SignMessagePreview.types.d.ts +3 -0
- package/src/lib/components/SignMessagePreview/utils/containsSpecialCharacters/containsSpecialCharacters.cjs +12 -0
- package/src/lib/components/SignMessagePreview/utils/containsSpecialCharacters/containsSpecialCharacters.d.ts +1 -0
- package/src/lib/components/SignMessagePreview/utils/containsSpecialCharacters/containsSpecialCharacters.js +8 -0
- package/src/lib/components/SignMessagePreview/utils/containsSpecialCharacters/index.d.ts +1 -0
- package/src/lib/components/SignMessagePreview/utils/index.d.ts +1 -0
- package/src/lib/components/SignMessagePreview/utils/isRawMessage/index.d.ts +1 -0
- package/src/lib/components/SignMessagePreview/utils/isRawMessage/isRawMessage.cjs +13 -0
- package/src/lib/components/SignMessagePreview/utils/isRawMessage/isRawMessage.d.ts +2 -0
- package/src/lib/components/SignMessagePreview/utils/isRawMessage/isRawMessage.js +9 -0
- package/src/lib/context/DynamicContext/DynamicContext.cjs +3 -3
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +3 -0
- package/src/lib/context/DynamicContext/DynamicContext.js +3 -3
- package/src/lib/shared/types/wallets.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/functions/createOwnerWallet/createOwnerWallet.cjs +1 -0
- package/src/lib/utils/functions/createOwnerWallet/createOwnerWallet.js +1 -0
- package/src/lib/utils/functions/walletListBuilder/utils/applyMultiWalletFilters/applyMultiWalletFilters.cjs +24 -0
- package/src/lib/utils/functions/walletListBuilder/utils/applyMultiWalletFilters/applyMultiWalletFilters.d.ts +6 -0
- package/src/lib/utils/functions/walletListBuilder/utils/applyMultiWalletFilters/applyMultiWalletFilters.js +20 -0
- package/src/lib/utils/functions/walletListBuilder/utils/applyMultiWalletFilters/index.d.ts +1 -0
- package/src/lib/utils/functions/walletListBuilder/utils/filterConnectedWallets/filterConnectedWallets.cjs +2 -2
- package/src/lib/utils/functions/walletListBuilder/utils/filterConnectedWallets/filterConnectedWallets.d.ts +2 -2
- package/src/lib/utils/functions/walletListBuilder/utils/filterConnectedWallets/filterConnectedWallets.js +2 -2
- package/src/lib/utils/functions/walletListBuilder/utils/filterWalletConnectWallets/filterWalletConnectWallets.cjs +20 -0
- package/src/lib/utils/functions/walletListBuilder/utils/filterWalletConnectWallets/filterWalletConnectWallets.d.ts +9 -0
- package/src/lib/utils/functions/walletListBuilder/utils/filterWalletConnectWallets/filterWalletConnectWallets.js +16 -0
- package/src/lib/utils/functions/walletListBuilder/utils/filterWalletConnectWallets/index.d.ts +1 -0
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.cjs +6 -9
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.d.ts +2 -3
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.js +6 -9
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +1 -0
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +1 -0
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.cjs +1 -0
- package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.js +1 -0
- package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.cjs +7 -3
- package/src/lib/utils/hooks/useEmbeddedWallet/useMPCEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.js +7 -3
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.cjs +5 -1
- package/src/lib/utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/useTurnkey/useTurnkey.js +5 -1
- package/src/lib/utils/hooks/useNetworkNotSupported/useNetworkNotSupported.cjs +14 -8
- package/src/lib/utils/hooks/useNetworkNotSupported/useNetworkNotSupported.js +14 -8
- package/src/lib/utils/hooks/useSwitchWallet/useSwitchWallet.cjs +1 -1
- package/src/lib/utils/hooks/useSwitchWallet/useSwitchWallet.js +1 -1
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.cjs +2 -0
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.js +2 -0
- package/src/lib/utils/hooks/useWalletConnectors/utils/findWallet/findWallet.cjs +4 -1
- package/src/lib/utils/hooks/useWalletConnectors/utils/findWallet/findWallet.js +4 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +1 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +1 -1
- package/src/lib/views/EmailVerification/EmailVerification.cjs +2 -1
- package/src/lib/views/EmailVerification/EmailVerification.js +2 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.cjs +4 -4
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.js +4 -4
- package/src/lib/views/WalletList/WalletList.cjs +4 -4
- package/src/lib/views/WalletList/WalletList.js +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
|
|
2
|
+
### [2.1.3](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.2...v2.1.3) (2024-06-14)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add in-app browser navigation support for sats-connect ([#5990](https://github.com/dynamic-labs/DynamicAuth/issues/5990)) ([7ea15b9](https://github.com/dynamic-labs/DynamicAuth/commit/7ea15b93d1864164acb82c1e73aae7f9130e1d44))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* cache getGenesisHash call to prevent over calling ([#5966](https://github.com/dynamic-labs/DynamicAuth/issues/5966)) ([#5970](https://github.com/dynamic-labs/DynamicAuth/issues/5970)) ([b624b2e](https://github.com/dynamic-labs/DynamicAuth/commit/b624b2ea5b398bf464d3098e7d81d83c7b5bf659))
|
|
13
|
+
* improvements to embedded solana wallet ([#6001](https://github.com/dynamic-labs/DynamicAuth/issues/6001)) ([a6437c9](https://github.com/dynamic-labs/DynamicAuth/commit/a6437c93e1946bca609d3d99d282123275022376)) ([#5815](https://github.com/dynamic-labs/DynamicAuth/issues/5815)) ([#5978](https://github.com/dynamic-labs/DynamicAuth/issues/5978)) ([dd92973](https://github.com/dynamic-labs/DynamicAuth/commit/dd9297365f0ccbee1217325328e173ae7ee9a922))
|
|
14
|
+
* show linked wallets with unavailable providers in user wallets list ([#6005](https://github.com/dynamic-labs/DynamicAuth/issues/6005)) ([79796d1](https://github.com/dynamic-labs/DynamicAuth/commit/79796d1b73670265ca9897314252b620afaa2e8a))
|
|
15
|
+
* close switch network modal after switching to a supported network ([#5987](https://github.com/dynamic-labs/DynamicAuth/issues/5987)) ([a7e762e](https://github.com/dynamic-labs/DynamicAuth/commit/a7e762ef63a72492d0c083a344111589a6fbc455))
|
|
16
|
+
|
|
2
17
|
### [2.1.2](https://github.com/dynamic-labs/DynamicAuth/compare/v2.1.2-alpha.1...v2.1.2) (2024-06-10)
|
|
3
18
|
|
|
4
19
|
|
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": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
|
|
@@ -17,18 +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/iconic": "2.1.
|
|
21
|
-
"@dynamic-labs/logger": "2.1.
|
|
22
|
-
"@dynamic-labs/multi-wallet": "2.1.
|
|
23
|
-
"@dynamic-labs/rpc-provider-ethereum": "2.1.
|
|
24
|
-
"@dynamic-labs/rpc-provider-solana": "2.1.
|
|
25
|
-
"@dynamic-labs/rpc-providers": "2.1.
|
|
26
|
-
"@dynamic-labs/store": "2.1.
|
|
27
|
-
"@dynamic-labs/types": "2.1.
|
|
28
|
-
"@dynamic-labs/utils": "2.1.
|
|
29
|
-
"@dynamic-labs/viem-utils": "2.1.
|
|
30
|
-
"@dynamic-labs/wallet-book": "2.1.
|
|
31
|
-
"@dynamic-labs/wallet-connector-core": "2.1.
|
|
20
|
+
"@dynamic-labs/iconic": "2.1.3",
|
|
21
|
+
"@dynamic-labs/logger": "2.1.3",
|
|
22
|
+
"@dynamic-labs/multi-wallet": "2.1.3",
|
|
23
|
+
"@dynamic-labs/rpc-provider-ethereum": "2.1.3",
|
|
24
|
+
"@dynamic-labs/rpc-provider-solana": "2.1.3",
|
|
25
|
+
"@dynamic-labs/rpc-providers": "2.1.3",
|
|
26
|
+
"@dynamic-labs/store": "2.1.3",
|
|
27
|
+
"@dynamic-labs/types": "2.1.3",
|
|
28
|
+
"@dynamic-labs/utils": "2.1.3",
|
|
29
|
+
"@dynamic-labs/viem-utils": "2.1.3",
|
|
30
|
+
"@dynamic-labs/wallet-book": "2.1.3",
|
|
31
|
+
"@dynamic-labs/wallet-connector-core": "2.1.3",
|
|
32
32
|
"eventemitter3": "5.0.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
@@ -150,7 +150,7 @@ const AuthProviderIcon = ({ iconSize = 64, showStatus, wallet, }) => {
|
|
|
150
150
|
if (MagicEmailOrSocialIcon) {
|
|
151
151
|
return showStatus ? (jsxRuntime.jsx(IconWithStatus.IconWithStatus, { iconSize: iconSize, Icon: MagicEmailOrSocialIcon, variant: walletForIcon.connected ? 'green' : 'red' })) : (jsxRuntime.jsx(MagicEmailOrSocialIcon, { style: { height: pixelToRem.pixelToRem(iconSize), width: pixelToRem.pixelToRem(iconSize) } }));
|
|
152
152
|
}
|
|
153
|
-
return showStatus ? (jsxRuntime.jsx(WalletIconWithStatus.WalletIconWithStatus, { iconSize: iconSize, walletKey: walletForIcon.
|
|
153
|
+
return showStatus ? (jsxRuntime.jsx(WalletIconWithStatus.WalletIconWithStatus, { iconSize: iconSize, walletKey: walletForIcon.key, connected: walletForIcon.connected, variant: 'secondary' })) : (jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: walletForIcon.key, style: { height: pixelToRem.pixelToRem(iconSize), width: pixelToRem.pixelToRem(iconSize) } }));
|
|
154
154
|
};
|
|
155
155
|
|
|
156
156
|
exports.AuthProviderIcon = AuthProviderIcon;
|
|
@@ -146,7 +146,7 @@ const AuthProviderIcon = ({ iconSize = 64, showStatus, wallet, }) => {
|
|
|
146
146
|
if (MagicEmailOrSocialIcon) {
|
|
147
147
|
return showStatus ? (jsx(IconWithStatus, { iconSize: iconSize, Icon: MagicEmailOrSocialIcon, variant: walletForIcon.connected ? 'green' : 'red' })) : (jsx(MagicEmailOrSocialIcon, { style: { height: pixelToRem(iconSize), width: pixelToRem(iconSize) } }));
|
|
148
148
|
}
|
|
149
|
-
return showStatus ? (jsx(WalletIconWithStatus, { iconSize: iconSize, walletKey: walletForIcon.
|
|
149
|
+
return showStatus ? (jsx(WalletIconWithStatus, { iconSize: iconSize, walletKey: walletForIcon.key, connected: walletForIcon.connected, variant: 'secondary' })) : (jsx(WalletIcon, { walletKey: walletForIcon.key, style: { height: pixelToRem(iconSize), width: pixelToRem(iconSize) } }));
|
|
150
150
|
};
|
|
151
151
|
|
|
152
152
|
export { AuthProviderIcon };
|
|
@@ -5,24 +5,32 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var React = require('react');
|
|
8
|
+
var utils = require('@dynamic-labs/utils');
|
|
8
9
|
var Typography = require('../Typography/Typography.cjs');
|
|
9
10
|
var isSignTypedData = require('./utils/isSignTypedData/isSignTypedData.cjs');
|
|
11
|
+
var isRawMessage = require('./utils/isRawMessage/isRawMessage.cjs');
|
|
10
12
|
var SignTypedDataPreview = require('./components/SignTypedDataPreview/SignTypedDataPreview.cjs');
|
|
13
|
+
var containsSpecialCharacters = require('./utils/containsSpecialCharacters/containsSpecialCharacters.cjs');
|
|
11
14
|
|
|
12
15
|
const SignMessagePreview = ({ message, }) => {
|
|
13
|
-
const
|
|
16
|
+
const jsonMessage = React.useMemo(() => {
|
|
14
17
|
try {
|
|
15
18
|
const json = JSON.parse(message);
|
|
16
|
-
return
|
|
19
|
+
return json;
|
|
17
20
|
}
|
|
18
21
|
catch (e) {
|
|
19
22
|
return undefined;
|
|
20
23
|
}
|
|
21
24
|
}, [message]);
|
|
22
|
-
|
|
23
|
-
|
|
25
|
+
const messageText = React.useMemo(() => {
|
|
26
|
+
const text = isRawMessage.isRawMessage(jsonMessage) ? jsonMessage.raw : message;
|
|
27
|
+
const readableText = utils.isHex(text) ? utils.hexToString(text) : text;
|
|
28
|
+
return !containsSpecialCharacters.containsSpecialCharacters(readableText) ? readableText : text;
|
|
29
|
+
}, [jsonMessage, message]);
|
|
30
|
+
if (isSignTypedData.isSignTypedData(jsonMessage)) {
|
|
31
|
+
return (jsxRuntime.jsx(SignTypedDataPreview.SignTypedDataPreview, { currentType: jsonMessage.primaryType, types: jsonMessage.types, showTypeName: true, data: jsonMessage.message }));
|
|
24
32
|
}
|
|
25
|
-
return (jsxRuntime.jsx(Typography.Typography, { color: 'primary', variant: 'body_normal', children: jsxRuntime.jsx("span", { style: { whiteSpace: 'pre-line' }, children:
|
|
33
|
+
return (jsxRuntime.jsx(Typography.Typography, { color: 'primary', variant: 'body_normal', children: jsxRuntime.jsx("span", { style: { whiteSpace: 'pre-line' }, children: messageText }) }));
|
|
26
34
|
};
|
|
27
35
|
|
|
28
36
|
exports.SignMessagePreview = SignMessagePreview;
|
|
@@ -1,24 +1,32 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
|
+
import { isHex, hexToString } from '@dynamic-labs/utils';
|
|
4
5
|
import { Typography } from '../Typography/Typography.js';
|
|
5
6
|
import { isSignTypedData } from './utils/isSignTypedData/isSignTypedData.js';
|
|
7
|
+
import { isRawMessage } from './utils/isRawMessage/isRawMessage.js';
|
|
6
8
|
import { SignTypedDataPreview } from './components/SignTypedDataPreview/SignTypedDataPreview.js';
|
|
9
|
+
import { containsSpecialCharacters } from './utils/containsSpecialCharacters/containsSpecialCharacters.js';
|
|
7
10
|
|
|
8
11
|
const SignMessagePreview = ({ message, }) => {
|
|
9
|
-
const
|
|
12
|
+
const jsonMessage = useMemo(() => {
|
|
10
13
|
try {
|
|
11
14
|
const json = JSON.parse(message);
|
|
12
|
-
return
|
|
15
|
+
return json;
|
|
13
16
|
}
|
|
14
17
|
catch (e) {
|
|
15
18
|
return undefined;
|
|
16
19
|
}
|
|
17
20
|
}, [message]);
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
const messageText = useMemo(() => {
|
|
22
|
+
const text = isRawMessage(jsonMessage) ? jsonMessage.raw : message;
|
|
23
|
+
const readableText = isHex(text) ? hexToString(text) : text;
|
|
24
|
+
return !containsSpecialCharacters(readableText) ? readableText : text;
|
|
25
|
+
}, [jsonMessage, message]);
|
|
26
|
+
if (isSignTypedData(jsonMessage)) {
|
|
27
|
+
return (jsx(SignTypedDataPreview, { currentType: jsonMessage.primaryType, types: jsonMessage.types, showTypeName: true, data: jsonMessage.message }));
|
|
20
28
|
}
|
|
21
|
-
return (jsx(Typography, { color: 'primary', variant: 'body_normal', children: jsx("span", { style: { whiteSpace: 'pre-line' }, children:
|
|
29
|
+
return (jsx(Typography, { color: 'primary', variant: 'body_normal', children: jsx("span", { style: { whiteSpace: 'pre-line' }, children: messageText }) }));
|
|
22
30
|
};
|
|
23
31
|
|
|
24
32
|
export { SignMessagePreview };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
const containsSpecialCharacters = (value) => {
|
|
7
|
+
// This regex checks for any characters outside the standard ASCII printable range and common control characters
|
|
8
|
+
const regex = /[^ -~\s]/;
|
|
9
|
+
return regex.test(value);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
exports.containsSpecialCharacters = containsSpecialCharacters;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const containsSpecialCharacters: (value: string) => boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
const containsSpecialCharacters = (value) => {
|
|
3
|
+
// This regex checks for any characters outside the standard ASCII printable range and common control characters
|
|
4
|
+
const regex = /[^ -~\s]/;
|
|
5
|
+
return regex.test(value);
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export { containsSpecialCharacters };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { containsSpecialCharacters } from './containsSpecialCharacters';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { isRawMessage } from './isRawMessage';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
const isRawMessage = (data) => {
|
|
7
|
+
if (typeof data !== 'object' || data === null) {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
return typeof data.raw === 'string';
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
exports.isRawMessage = isRawMessage;
|
|
@@ -136,7 +136,7 @@ const PUBLIC_PROJECT_LIVE_ENVIRONMENT_ID = '2762a57b-faa4-41ce-9f16-abff9300e2c9
|
|
|
136
136
|
const DynamicContext = React.createContext(undefined);
|
|
137
137
|
/** The context provider itself we only use internally */
|
|
138
138
|
const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, locale: locale$1, }) => {
|
|
139
|
-
var _a, _b, _c, _d, _e, _f;
|
|
139
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
140
140
|
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 = 'in-app-browser', 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;
|
|
141
141
|
localStorage.LocalStorage.setSuffix(settings$1.localStorageSuffix);
|
|
142
142
|
/**
|
|
@@ -219,7 +219,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, lo
|
|
|
219
219
|
appLogoUrl,
|
|
220
220
|
appName,
|
|
221
221
|
getAppOrigin: () => window.location.origin,
|
|
222
|
-
hideEmbeddedWalletTransactionUIs,
|
|
222
|
+
hideEmbeddedWalletTransactionUIs: hideEmbeddedWalletTransactionUIs !== null && hideEmbeddedWalletTransactionUIs !== void 0 ? hideEmbeddedWalletTransactionUIs : !((_g = (_f = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _f === void 0 ? void 0 : _f.embeddedWallets) === null || _g === void 0 ? void 0 : _g.showEmbeddedWalletActionsUI),
|
|
223
223
|
});
|
|
224
224
|
const { walletConnectorOptions } = useWalletConnectorOptions.useWalletConnectorOptions({
|
|
225
225
|
appLogoUrl,
|
|
@@ -685,7 +685,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, lo
|
|
|
685
685
|
}
|
|
686
686
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
687
687
|
}, [multiWallet, multiWalletWidgetState, showDynamicUserProfile]);
|
|
688
|
-
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, ((
|
|
688
|
+
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, ((_h = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design) === null || _h === void 0 ? void 0 : _h.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({
|
|
689
689
|
bridgeOnboardingCompleted,
|
|
690
690
|
connectedWallets,
|
|
691
691
|
isAuthenticated: isAuthenticated || Boolean(primaryWallet),
|
|
@@ -52,6 +52,9 @@ export interface DynamicContextProps {
|
|
|
52
52
|
flowNetwork?: 'testnet' | 'mainnet';
|
|
53
53
|
handlers?: DynamicHandlers;
|
|
54
54
|
headless?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated Set this property in the dashboard instead
|
|
57
|
+
*/
|
|
55
58
|
hideEmbeddedWalletTransactionUIs?: boolean;
|
|
56
59
|
initialAuthenticationMode?: AuthModeType;
|
|
57
60
|
localStorageSuffix?: string;
|
|
@@ -132,7 +132,7 @@ const PUBLIC_PROJECT_LIVE_ENVIRONMENT_ID = '2762a57b-faa4-41ce-9f16-abff9300e2c9
|
|
|
132
132
|
const DynamicContext = createContext(undefined);
|
|
133
133
|
/** The context provider itself we only use internally */
|
|
134
134
|
const InnerDynamicContextProvider = ({ children, theme, settings, locale, }) => {
|
|
135
|
-
var _a, _b, _c, _d, _e, _f;
|
|
135
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
136
136
|
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 = 'in-app-browser', 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;
|
|
137
137
|
LocalStorage.setSuffix(settings.localStorageSuffix);
|
|
138
138
|
/**
|
|
@@ -215,7 +215,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale, }) =>
|
|
|
215
215
|
appLogoUrl,
|
|
216
216
|
appName,
|
|
217
217
|
getAppOrigin: () => window.location.origin,
|
|
218
|
-
hideEmbeddedWalletTransactionUIs,
|
|
218
|
+
hideEmbeddedWalletTransactionUIs: hideEmbeddedWalletTransactionUIs !== null && hideEmbeddedWalletTransactionUIs !== void 0 ? hideEmbeddedWalletTransactionUIs : !((_g = (_f = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _f === void 0 ? void 0 : _f.embeddedWallets) === null || _g === void 0 ? void 0 : _g.showEmbeddedWalletActionsUI),
|
|
219
219
|
});
|
|
220
220
|
const { walletConnectorOptions } = useWalletConnectorOptions({
|
|
221
221
|
appLogoUrl,
|
|
@@ -681,7 +681,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale, }) =>
|
|
|
681
681
|
}
|
|
682
682
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
683
683
|
}, [multiWallet, multiWalletWidgetState, showDynamicUserProfile]);
|
|
684
|
-
return (jsx(I18nextProvider, { i18n: i18nSDKInstance, children: jsx(DynamicContext.Provider, { value: value, children: jsx(WalletBookContextProvider, { walletBook: walletBook, children: jsx(ThemeContextProvider, { customerTheme: parseTheme(theme, ((
|
|
684
|
+
return (jsx(I18nextProvider, { i18n: i18nSDKInstance, children: jsx(DynamicContext.Provider, { value: value, children: jsx(WalletBookContextProvider, { walletBook: walletBook, children: jsx(ThemeContextProvider, { customerTheme: parseTheme(theme, ((_h = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design) === null || _h === void 0 ? void 0 : _h.modal) || undefined), designSettings: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design, children: jsx(LoadingContextProvider, { children: jsxs(ViewContextProvider, { initialView: getInitialView({
|
|
685
685
|
bridgeOnboardingCompleted,
|
|
686
686
|
connectedWallets,
|
|
687
687
|
isAuthenticated: isAuthenticated || Boolean(primaryWallet),
|
|
@@ -10,6 +10,7 @@ export type Wallet = BaseWallet & {
|
|
|
10
10
|
* like ordinals and payment addresses for bitcoin wallets
|
|
11
11
|
*/
|
|
12
12
|
additionalAddresses?: WalletAdditionalAddress[];
|
|
13
|
+
key: string;
|
|
13
14
|
};
|
|
14
15
|
export type WalletAction = 'select' | 'unlink';
|
|
15
16
|
export type WalletWithAction = {
|