@dynamic-labs/sdk-react-core 0.17.12 → 0.17.14
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 +14 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +8 -8
- package/src/lib/context/DynamicContext/DynamicContext.cjs +4 -3
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +2 -1
- package/src/lib/context/DynamicContext/DynamicContext.js +4 -3
- package/src/lib/utils/hooks/useWallets/useWallets.cjs +4 -1
- package/src/lib/utils/hooks/useWallets/useWallets.d.ts +2 -1
- package/src/lib/utils/hooks/useWallets/useWallets.js +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
|
|
2
|
+
### [0.17.14](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.13...v0.17.14) (2023-06-27)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* add support for custom walletconnect v1 bridge ([#2487](https://github.com/dynamic-labs/DynamicAuth/issues/2487)) ([#2498](https://github.com/dynamic-labs/DynamicAuth/issues/2498)) ([c050e56](https://github.com/dynamic-labs/DynamicAuth/commit/c050e569c05801f661940e7b5a76677992fa2b86))
|
|
8
|
+
|
|
9
|
+
### [0.17.13](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.12...v0.17.13) (2023-06-27)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* wagmi detect connect-only wallet ([#2492](https://github.com/dynamic-labs/DynamicAuth/issues/2492)) ([890f158](https://github.com/dynamic-labs/DynamicAuth/commit/890f1587331e63aae901f10665218a6e4271492c))
|
|
15
|
+
|
|
2
16
|
### [0.17.12](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.11...v0.17.12) (2023-06-26)
|
|
3
17
|
|
|
4
18
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.14",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
"formik": "2.2.9",
|
|
17
17
|
"qrcode": "1.5.1",
|
|
18
18
|
"ethers": "5.7.2",
|
|
19
|
-
"@dynamic-labs/logger": "0.17.
|
|
20
|
-
"@dynamic-labs/multi-wallet": "0.17.
|
|
21
|
-
"@dynamic-labs/rpc-providers": "0.17.
|
|
22
|
-
"@dynamic-labs/types": "0.17.
|
|
23
|
-
"@dynamic-labs/utils": "0.17.
|
|
24
|
-
"@dynamic-labs/wallet-book": "0.17.
|
|
25
|
-
"@dynamic-labs/wallet-connector-core": "0.17.
|
|
19
|
+
"@dynamic-labs/logger": "0.17.14",
|
|
20
|
+
"@dynamic-labs/multi-wallet": "0.17.14",
|
|
21
|
+
"@dynamic-labs/rpc-providers": "0.17.14",
|
|
22
|
+
"@dynamic-labs/types": "0.17.14",
|
|
23
|
+
"@dynamic-labs/utils": "0.17.14",
|
|
24
|
+
"@dynamic-labs/wallet-book": "0.17.14",
|
|
25
|
+
"@dynamic-labs/wallet-connector-core": "0.17.14"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"semver": "7.3.8"
|
|
@@ -87,7 +87,7 @@ var useSetShowAuthFlowWithInit = require('./hooks/useSetShowAuthFlowWithInit/use
|
|
|
87
87
|
|
|
88
88
|
const EMPTY_INITIAL_USER = undefined;
|
|
89
89
|
const DynamicContext = React.createContext(undefined);
|
|
90
|
-
const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, accessDeniedMessageSecondary, accessDeniedButton, apiBaseUrl, appLogoUrl = 'https://demo.dynamic.xyz/assets/dynamic-logo.svg', appName = 'Dynamic Example', cssOverrides, defaultNumberOfWalletsToShow = values.DEFAULT_NUMBER_OF_WALLETS_TO_SHOW, flowNetwork, initialAuthenticationMode = 'connect-and-sign', debugError = false, displayTermsOfService = true, newToWeb3WalletChainMap, enableVisitTrackingOnConnectOnly = true, environmentId, localStorageSuffix, eventsCallbacks, evmNetworks, walletsFilter, logLevel = 'WARN', multiWallet: deprecatedMultiWallet, notInTheListImageUrl, onboardingImageUrl, policiesConsentInnerComponent, privacyPolicyUrl, signWithEmailWalletName, socialMediaLinkText, socialMediaIconUrl, socialMediaUrl, termsOfServiceUrl, toolkitEnabled, siweStatement, shadowDOMEnabled = true, walletConnectors: walletConnectorsProp, }, children, theme, }) => {
|
|
90
|
+
const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, accessDeniedMessageSecondary, accessDeniedButton, apiBaseUrl, appLogoUrl = 'https://demo.dynamic.xyz/assets/dynamic-logo.svg', appName = 'Dynamic Example', cssOverrides, defaultNumberOfWalletsToShow = values.DEFAULT_NUMBER_OF_WALLETS_TO_SHOW, flowNetwork, initialAuthenticationMode = 'connect-and-sign', debugError = false, displayTermsOfService = true, newToWeb3WalletChainMap, enableVisitTrackingOnConnectOnly = true, environmentId, localStorageSuffix, eventsCallbacks, evmNetworks, walletsFilter, logLevel = 'WARN', multiWallet: deprecatedMultiWallet, notInTheListImageUrl, onboardingImageUrl, policiesConsentInnerComponent, privacyPolicyUrl, signWithEmailWalletName, socialMediaLinkText, socialMediaIconUrl, socialMediaUrl, termsOfServiceUrl, toolkitEnabled, siweStatement, shadowDOMEnabled = true, walletConnectV1Bridge, walletConnectors: walletConnectorsProp, }, children, theme, }) => {
|
|
91
91
|
var _a, _b, _c, _d, _e;
|
|
92
92
|
logger.logger.setLogLevel(logLevel);
|
|
93
93
|
walletConnectorCore.logger.setLogLevel(logLevel);
|
|
@@ -137,6 +137,7 @@ const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, access
|
|
|
137
137
|
flowNetwork,
|
|
138
138
|
networkConfigurations: serverNetworkConfigurations,
|
|
139
139
|
projectSettings,
|
|
140
|
+
walletConnectV1Bridge,
|
|
140
141
|
walletConnectorsProp,
|
|
141
142
|
walletUiUtils,
|
|
142
143
|
});
|
|
@@ -324,8 +325,8 @@ const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, access
|
|
|
324
325
|
computeConnectedStateForWallets,
|
|
325
326
|
connectWallet,
|
|
326
327
|
connectedWallet,
|
|
327
|
-
connectedWallets:
|
|
328
|
-
? [
|
|
328
|
+
connectedWallets: walletForUserFacingContext
|
|
329
|
+
? [walletForUserFacingContext, ...secondaryWallets]
|
|
329
330
|
: [],
|
|
330
331
|
consumeNonce,
|
|
331
332
|
cssOverrides,
|
|
@@ -154,10 +154,11 @@ export interface DynamicContextProps {
|
|
|
154
154
|
socialMediaUrl?: string;
|
|
155
155
|
termsOfServiceUrl?: string;
|
|
156
156
|
toolkitEnabled?: boolean;
|
|
157
|
+
walletConnectV1Bridge?: string;
|
|
157
158
|
walletConnectors?: WalletConnectorsMethod[];
|
|
158
159
|
walletsFilter?: (options: WalletOption[]) => WalletOption[];
|
|
159
160
|
};
|
|
160
161
|
theme?: ThemeData | ThemeSetting;
|
|
161
162
|
}
|
|
162
163
|
export declare const DynamicContext: import("react").Context<IDynamicContext | undefined>;
|
|
163
|
-
export declare const DynamicContextProvider: ({ settings: { accessDeniedMessagePrimary, accessDeniedMessageSecondary, accessDeniedButton, apiBaseUrl, appLogoUrl, appName, cssOverrides, defaultNumberOfWalletsToShow, flowNetwork, initialAuthenticationMode, debugError, displayTermsOfService, newToWeb3WalletChainMap, enableVisitTrackingOnConnectOnly, environmentId, localStorageSuffix, eventsCallbacks, evmNetworks, walletsFilter, logLevel, multiWallet: deprecatedMultiWallet, notInTheListImageUrl, onboardingImageUrl, policiesConsentInnerComponent, privacyPolicyUrl, signWithEmailWalletName, socialMediaLinkText, socialMediaIconUrl, socialMediaUrl, termsOfServiceUrl, toolkitEnabled, siweStatement, shadowDOMEnabled, walletConnectors: walletConnectorsProp, }, children, theme, }: DynamicContextProps) => JSX.Element;
|
|
164
|
+
export declare const DynamicContextProvider: ({ settings: { accessDeniedMessagePrimary, accessDeniedMessageSecondary, accessDeniedButton, apiBaseUrl, appLogoUrl, appName, cssOverrides, defaultNumberOfWalletsToShow, flowNetwork, initialAuthenticationMode, debugError, displayTermsOfService, newToWeb3WalletChainMap, enableVisitTrackingOnConnectOnly, environmentId, localStorageSuffix, eventsCallbacks, evmNetworks, walletsFilter, logLevel, multiWallet: deprecatedMultiWallet, notInTheListImageUrl, onboardingImageUrl, policiesConsentInnerComponent, privacyPolicyUrl, signWithEmailWalletName, socialMediaLinkText, socialMediaIconUrl, socialMediaUrl, termsOfServiceUrl, toolkitEnabled, siweStatement, shadowDOMEnabled, walletConnectV1Bridge, walletConnectors: walletConnectorsProp, }, children, theme, }: DynamicContextProps) => JSX.Element;
|
|
@@ -83,7 +83,7 @@ import { useSetShowAuthFlowWithInit } from './hooks/useSetShowAuthFlowWithInit/u
|
|
|
83
83
|
|
|
84
84
|
const EMPTY_INITIAL_USER = undefined;
|
|
85
85
|
const DynamicContext = createContext(undefined);
|
|
86
|
-
const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, accessDeniedMessageSecondary, accessDeniedButton, apiBaseUrl, appLogoUrl = 'https://demo.dynamic.xyz/assets/dynamic-logo.svg', appName = 'Dynamic Example', cssOverrides, defaultNumberOfWalletsToShow = DEFAULT_NUMBER_OF_WALLETS_TO_SHOW, flowNetwork, initialAuthenticationMode = 'connect-and-sign', debugError = false, displayTermsOfService = true, newToWeb3WalletChainMap, enableVisitTrackingOnConnectOnly = true, environmentId, localStorageSuffix, eventsCallbacks, evmNetworks, walletsFilter, logLevel = 'WARN', multiWallet: deprecatedMultiWallet, notInTheListImageUrl, onboardingImageUrl, policiesConsentInnerComponent, privacyPolicyUrl, signWithEmailWalletName, socialMediaLinkText, socialMediaIconUrl, socialMediaUrl, termsOfServiceUrl, toolkitEnabled, siweStatement, shadowDOMEnabled = true, walletConnectors: walletConnectorsProp, }, children, theme, }) => {
|
|
86
|
+
const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, accessDeniedMessageSecondary, accessDeniedButton, apiBaseUrl, appLogoUrl = 'https://demo.dynamic.xyz/assets/dynamic-logo.svg', appName = 'Dynamic Example', cssOverrides, defaultNumberOfWalletsToShow = DEFAULT_NUMBER_OF_WALLETS_TO_SHOW, flowNetwork, initialAuthenticationMode = 'connect-and-sign', debugError = false, displayTermsOfService = true, newToWeb3WalletChainMap, enableVisitTrackingOnConnectOnly = true, environmentId, localStorageSuffix, eventsCallbacks, evmNetworks, walletsFilter, logLevel = 'WARN', multiWallet: deprecatedMultiWallet, notInTheListImageUrl, onboardingImageUrl, policiesConsentInnerComponent, privacyPolicyUrl, signWithEmailWalletName, socialMediaLinkText, socialMediaIconUrl, socialMediaUrl, termsOfServiceUrl, toolkitEnabled, siweStatement, shadowDOMEnabled = true, walletConnectV1Bridge, walletConnectors: walletConnectorsProp, }, children, theme, }) => {
|
|
87
87
|
var _a, _b, _c, _d, _e;
|
|
88
88
|
logger.setLogLevel(logLevel);
|
|
89
89
|
logger$1.setLogLevel(logLevel);
|
|
@@ -133,6 +133,7 @@ const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, access
|
|
|
133
133
|
flowNetwork,
|
|
134
134
|
networkConfigurations: serverNetworkConfigurations,
|
|
135
135
|
projectSettings,
|
|
136
|
+
walletConnectV1Bridge,
|
|
136
137
|
walletConnectorsProp,
|
|
137
138
|
walletUiUtils,
|
|
138
139
|
});
|
|
@@ -320,8 +321,8 @@ const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, access
|
|
|
320
321
|
computeConnectedStateForWallets,
|
|
321
322
|
connectWallet,
|
|
322
323
|
connectedWallet,
|
|
323
|
-
connectedWallets:
|
|
324
|
-
? [
|
|
324
|
+
connectedWallets: walletForUserFacingContext
|
|
325
|
+
? [walletForUserFacingContext, ...secondaryWallets]
|
|
325
326
|
: [],
|
|
326
327
|
consumeNonce,
|
|
327
328
|
cssOverrides,
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var data = require('../../../views/WalletList/data.cjs');
|
|
7
7
|
|
|
8
|
-
const useWallets = ({ projectSettings, appLogoUrl, appName, flowNetwork, networkConfigurations, walletUiUtils, walletConnectorsProp, }) => {
|
|
8
|
+
const useWallets = ({ projectSettings, appLogoUrl, appName, flowNetwork, networkConfigurations, walletConnectV1Bridge, walletUiUtils, walletConnectorsProp, }) => {
|
|
9
9
|
const wallets = React.useMemo(() => {
|
|
10
10
|
if (!projectSettings)
|
|
11
11
|
return [];
|
|
@@ -16,6 +16,7 @@ const useWallets = ({ projectSettings, appLogoUrl, appName, flowNetwork, network
|
|
|
16
16
|
flowNetwork,
|
|
17
17
|
networkConfigurations,
|
|
18
18
|
skipMemo: true,
|
|
19
|
+
walletConnectV1Bridge,
|
|
19
20
|
walletConnectorsProp: walletConnectorsProp !== null && walletConnectorsProp !== void 0 ? walletConnectorsProp : [],
|
|
20
21
|
walletUiUtils,
|
|
21
22
|
});
|
|
@@ -26,6 +27,7 @@ const useWallets = ({ projectSettings, appLogoUrl, appName, flowNetwork, network
|
|
|
26
27
|
flowNetwork,
|
|
27
28
|
networkConfigurations,
|
|
28
29
|
skipMemo: true,
|
|
30
|
+
walletConnectV1Bridge,
|
|
29
31
|
walletConnectorsProp: walletConnectorsProp !== null && walletConnectorsProp !== void 0 ? walletConnectorsProp : [],
|
|
30
32
|
walletUiUtils,
|
|
31
33
|
});
|
|
@@ -37,6 +39,7 @@ const useWallets = ({ projectSettings, appLogoUrl, appName, flowNetwork, network
|
|
|
37
39
|
networkConfigurations,
|
|
38
40
|
projectSettings,
|
|
39
41
|
walletConnectorsProp,
|
|
42
|
+
walletConnectV1Bridge,
|
|
40
43
|
flowNetwork,
|
|
41
44
|
]);
|
|
42
45
|
return { wallets };
|
|
@@ -7,10 +7,11 @@ type Props = {
|
|
|
7
7
|
flowNetwork?: 'mainnet' | 'testnet';
|
|
8
8
|
networkConfigurations: NetworkConfigurationMap | undefined;
|
|
9
9
|
projectSettings: ProjectSettings | undefined;
|
|
10
|
+
walletConnectV1Bridge?: string;
|
|
10
11
|
walletConnectorsProp?: WalletConnectorsMethod[];
|
|
11
12
|
walletUiUtils: WalletUiUtils;
|
|
12
13
|
};
|
|
13
|
-
export declare const useWallets: ({ projectSettings, appLogoUrl, appName, flowNetwork, networkConfigurations, walletUiUtils, walletConnectorsProp, }: Props) => {
|
|
14
|
+
export declare const useWallets: ({ projectSettings, appLogoUrl, appName, flowNetwork, networkConfigurations, walletConnectV1Bridge, walletUiUtils, walletConnectorsProp, }: Props) => {
|
|
14
15
|
wallets: import("../../../shared").WalletOption[];
|
|
15
16
|
};
|
|
16
17
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
import { getInstalledWallets, getNotInstalledWallets } from '../../../views/WalletList/data.js';
|
|
3
3
|
|
|
4
|
-
const useWallets = ({ projectSettings, appLogoUrl, appName, flowNetwork, networkConfigurations, walletUiUtils, walletConnectorsProp, }) => {
|
|
4
|
+
const useWallets = ({ projectSettings, appLogoUrl, appName, flowNetwork, networkConfigurations, walletConnectV1Bridge, walletUiUtils, walletConnectorsProp, }) => {
|
|
5
5
|
const wallets = useMemo(() => {
|
|
6
6
|
if (!projectSettings)
|
|
7
7
|
return [];
|
|
@@ -12,6 +12,7 @@ const useWallets = ({ projectSettings, appLogoUrl, appName, flowNetwork, network
|
|
|
12
12
|
flowNetwork,
|
|
13
13
|
networkConfigurations,
|
|
14
14
|
skipMemo: true,
|
|
15
|
+
walletConnectV1Bridge,
|
|
15
16
|
walletConnectorsProp: walletConnectorsProp !== null && walletConnectorsProp !== void 0 ? walletConnectorsProp : [],
|
|
16
17
|
walletUiUtils,
|
|
17
18
|
});
|
|
@@ -22,6 +23,7 @@ const useWallets = ({ projectSettings, appLogoUrl, appName, flowNetwork, network
|
|
|
22
23
|
flowNetwork,
|
|
23
24
|
networkConfigurations,
|
|
24
25
|
skipMemo: true,
|
|
26
|
+
walletConnectV1Bridge,
|
|
25
27
|
walletConnectorsProp: walletConnectorsProp !== null && walletConnectorsProp !== void 0 ? walletConnectorsProp : [],
|
|
26
28
|
walletUiUtils,
|
|
27
29
|
});
|
|
@@ -33,6 +35,7 @@ const useWallets = ({ projectSettings, appLogoUrl, appName, flowNetwork, network
|
|
|
33
35
|
networkConfigurations,
|
|
34
36
|
projectSettings,
|
|
35
37
|
walletConnectorsProp,
|
|
38
|
+
walletConnectV1Bridge,
|
|
36
39
|
flowNetwork,
|
|
37
40
|
]);
|
|
38
41
|
return { wallets };
|