@dynamic-labs/sdk-react-core 0.17.23 → 0.17.25

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 CHANGED
@@ -1,4 +1,17 @@
1
1
 
2
+ ### [0.17.25](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.24...v0.17.25) (2023-07-19)
3
+
4
+ ### Features
5
+
6
+ * update magic to v18.4.1
7
+
8
+ ### [0.17.24](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.23...v0.17.24) (2023-07-17)
9
+
10
+
11
+ ### Features
12
+
13
+ * add magic to ethereum-all package ([#2577](https://github.com/dynamic-labs/DynamicAuth/issues/2577)) ([10893ce](https://github.com/dynamic-labs/DynamicAuth/commit/10893ce51b6c3ce9cd9c82b4a094ce653352cfb0))
14
+
2
15
  ### [0.17.23](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.22...v0.17.23) (2023-07-11)
3
16
 
4
17
 
package/package.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var version = "0.17.23";
5
+ var version = "0.17.25";
6
6
  var dependencies = {
7
7
  "react-focus-lock": "2.9.2",
8
8
  "@dynamic-labs/iconic": "0.1.23",
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
- var version = "0.17.23";
1
+ var version = "0.17.25";
2
2
  var dependencies = {
3
3
  "react-focus-lock": "2.9.2",
4
4
  "@dynamic-labs/iconic": "0.1.23",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "0.17.23",
3
+ "version": "0.17.25",
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.23",
20
- "@dynamic-labs/multi-wallet": "0.17.23",
21
- "@dynamic-labs/rpc-providers": "0.17.23",
22
- "@dynamic-labs/types": "0.17.23",
23
- "@dynamic-labs/utils": "0.17.23",
24
- "@dynamic-labs/wallet-book": "0.17.23",
25
- "@dynamic-labs/wallet-connector-core": "0.17.23"
19
+ "@dynamic-labs/logger": "0.17.25",
20
+ "@dynamic-labs/multi-wallet": "0.17.25",
21
+ "@dynamic-labs/rpc-providers": "0.17.25",
22
+ "@dynamic-labs/types": "0.17.25",
23
+ "@dynamic-labs/utils": "0.17.25",
24
+ "@dynamic-labs/wallet-book": "0.17.25",
25
+ "@dynamic-labs/wallet-connector-core": "0.17.25"
26
26
  },
27
27
  "devDependencies": {
28
28
  "semver": "7.3.8"
@@ -86,12 +86,16 @@ var useDisplayOrderState = require('./hooks/useDisplayOrderState/useDisplayOrder
86
86
  var useNameService = require('./hooks/useNameService/useNameService.cjs');
87
87
  var useSetShowAuthFlowWithInit = require('./hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.cjs');
88
88
 
89
+ const PUBLIC_PROJECT_LIVE_ENVIRONMENT_ID = '2762a57b-faa4-41ce-9f16-abff9300e2c9';
89
90
  const EMPTY_INITIAL_USER = undefined;
90
91
  const DynamicContext = React.createContext(undefined);
91
92
  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, }) => {
92
93
  var _a, _b, _c, _d, _e, _f, _g;
93
94
  logger.logger.setLogLevel(logLevel);
94
95
  walletConnectorCore.logger.setLogLevel(logLevel);
96
+ if (environmentId === PUBLIC_PROJECT_LIVE_ENVIRONMENT_ID) {
97
+ logger.logger.warn(`WARNING: DYNAMIC is using a test environment ID ${environmentId}. Please sign up on https://app.dynamic.xyz/ to get your production environment ID.`);
98
+ }
95
99
  ApiEndpoint.setBaseUrl((_a = process.env.DYNAMIC_API_BASE_URL) !== null && _a !== void 0 ? _a : apiBaseUrl);
96
100
  LSSuffix.setSuffix(localStorageSuffix);
97
101
  const isAuthenticated = Boolean(getAuthToken.getAuthToken());
@@ -537,3 +541,4 @@ const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, access
537
541
 
538
542
  exports.DynamicContext = DynamicContext;
539
543
  exports.DynamicContextProvider = DynamicContextProvider;
544
+ exports.PUBLIC_PROJECT_LIVE_ENVIRONMENT_ID = PUBLIC_PROJECT_LIVE_ENVIRONMENT_ID;
@@ -9,6 +9,7 @@ import { MultiWalletWidgetStateSetter } from '../../utils/hooks/multiWallet';
9
9
  import { SocialNetworkIconType } from '../../utils/functions/getSocialNetworkIcon';
10
10
  import { Callback } from './useCustomerCallbacks';
11
11
  import { DisplayOrder, SetDisplayOrderPriority } from './hooks';
12
+ export declare const PUBLIC_PROJECT_LIVE_ENVIRONMENT_ID = "2762a57b-faa4-41ce-9f16-abff9300e2c9";
12
13
  export interface IDynamicContext {
13
14
  accessDeniedMessagePrimary?: string;
14
15
  accessDeniedMessageSecondary?: string;
@@ -82,12 +82,16 @@ import { useDisplayOrderState } from './hooks/useDisplayOrderState/useDisplayOrd
82
82
  import { useNameService } from './hooks/useNameService/useNameService.js';
83
83
  import { useSetShowAuthFlowWithInit } from './hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.js';
84
84
 
85
+ const PUBLIC_PROJECT_LIVE_ENVIRONMENT_ID = '2762a57b-faa4-41ce-9f16-abff9300e2c9';
85
86
  const EMPTY_INITIAL_USER = undefined;
86
87
  const DynamicContext = createContext(undefined);
87
88
  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, }) => {
88
89
  var _a, _b, _c, _d, _e, _f, _g;
89
90
  logger.setLogLevel(logLevel);
90
91
  logger$1.setLogLevel(logLevel);
92
+ if (environmentId === PUBLIC_PROJECT_LIVE_ENVIRONMENT_ID) {
93
+ logger.warn(`WARNING: DYNAMIC is using a test environment ID ${environmentId}. Please sign up on https://app.dynamic.xyz/ to get your production environment ID.`);
94
+ }
91
95
  ApiEndpoint.setBaseUrl((_a = process.env.DYNAMIC_API_BASE_URL) !== null && _a !== void 0 ? _a : apiBaseUrl);
92
96
  LSSuffix.setSuffix(localStorageSuffix);
93
97
  const isAuthenticated = Boolean(getAuthToken());
@@ -531,4 +535,4 @@ const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, access
531
535
  return (jsx(DynamicContext.Provider, Object.assign({ value: value }, { children: jsx(ThemeContextProvider, Object.assign({ customerTheme: parseTheme(theme, ((_g = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design) === null || _g === void 0 ? void 0 : _g.modal) || undefined), designSettings: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design }, { children: jsx(LoadingContextProvider, { children: jsx(ViewContextProvider, Object.assign({ initialView: loginWithEmail ? 'login-with-email-or-wallet' : 'wallet-list' }, { children: jsx(QrCodeContextProvider, { children: jsx(EmailVerificationContextProvider, { children: jsx(ErrorContextProvider, { children: jsx(DynamicWidgetContextProvider, { children: jsx(DynamicBridgeWidgetContextProvider, { children: jsx(CaptchaContextProvider, { children: jsx(FundingContextProvider, { children: jsx(AccessDeniedContextProvider, { children: jsxs(SendBalanceContextProvider, { children: [jsx(DynamicAuthFlow, {}), jsx(Toolkit, {}), jsx(FundingWidget, {}), confirmationModal, children] }) }) }) }) }) }) }) }) }) })) }) })) })));
532
536
  };
533
537
 
534
- export { DynamicContext, DynamicContextProvider };
538
+ export { DynamicContext, DynamicContextProvider, PUBLIC_PROJECT_LIVE_ENVIRONMENT_ID };