@dynamic-labs/sdk-react-core 3.0.0-alpha.24 → 3.0.0-alpha.26

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/package.cjs +2 -2
  3. package/package.js +2 -2
  4. package/package.json +12 -11
  5. package/src/lib/config/ApiEndpoint.cjs +18 -1
  6. package/src/lib/config/ApiEndpoint.js +18 -1
  7. package/src/lib/context/AccessDeniedContext/AccessDeniedContext.cjs +4 -1
  8. package/src/lib/context/AccessDeniedContext/AccessDeniedContext.d.ts +2 -0
  9. package/src/lib/context/AccessDeniedContext/AccessDeniedContext.js +4 -1
  10. package/src/lib/context/DynamicContext/DynamicContext.cjs +1 -1
  11. package/src/lib/context/DynamicContext/DynamicContext.js +1 -1
  12. package/src/lib/context/DynamicContext/types/DynamicContextProps.d.ts +2 -2
  13. package/src/lib/context/DynamicContext/types/IDynamicContext.d.ts +2 -1
  14. package/src/lib/context/PhantomRedirectContext/useResponseHandlers.cjs +1 -1
  15. package/src/lib/context/PhantomRedirectContext/useResponseHandlers.js +1 -1
  16. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +1 -1
  17. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +1 -1
  18. package/src/lib/data/api/oauth/oauth.cjs +8 -3
  19. package/src/lib/data/api/oauth/oauth.js +8 -3
  20. package/src/lib/data/api/settings/settings.cjs +4 -0
  21. package/src/lib/data/api/settings/settings.js +4 -0
  22. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +1 -1
  23. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +1 -1
  24. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +1 -1
  25. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +1 -1
  26. package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +1 -1
  27. package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +1 -1
  28. package/src/lib/utils/hooks/useUserAuth/useUserAuth.cjs +5 -1
  29. package/src/lib/utils/hooks/useUserAuth/useUserAuth.js +5 -1
  30. package/src/lib/utils/hooks/useWalletConnectorOptions/useWalletConnectorOptions.d.ts +2 -2
  31. package/src/lib/views/NoAccess/NoAccess.cjs +6 -4
  32. package/src/lib/views/NoAccess/NoAccess.js +7 -5
package/CHANGELOG.md CHANGED
@@ -1,4 +1,15 @@
1
1
 
2
+ ## [3.0.0-alpha.26](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.25...v3.0.0-alpha.26) (2024-07-24)
3
+
4
+ ## [3.0.0-alpha.25](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.24...v3.0.0-alpha.25) (2024-07-24)
5
+
6
+
7
+ ### Features
8
+
9
+ * add ability to specify mobileExperience on a wallet by wallet ([#6195](https://github.com/dynamic-labs/DynamicAuth/issues/6195)) ([947fd0a](https://github.com/dynamic-labs/DynamicAuth/commit/947fd0ab864d1995a1ef35a51c77a585649fd43f))
10
+ * global wallet new package ([#6385](https://github.com/dynamic-labs/DynamicAuth/issues/6385)) ([230a0f3](https://github.com/dynamic-labs/DynamicAuth/commit/230a0f380c2bc8c69619daed0c7f3280da8b8bb9))
11
+ * solana send balance modal for injected ([#6405](https://github.com/dynamic-labs/DynamicAuth/issues/6405)) ([b8aa84b](https://github.com/dynamic-labs/DynamicAuth/commit/b8aa84b58eb71791405bf68b6c46c40bebb170f8))
12
+
2
13
  ## [3.0.0-alpha.24](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.23...v3.0.0-alpha.24) (2024-07-20)
3
14
 
4
15
  ## [3.0.0-alpha.23](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.22...v3.0.0-alpha.23) (2024-07-19)
package/package.cjs CHANGED
@@ -3,9 +3,9 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "3.0.0-alpha.24";
6
+ var version = "3.0.0-alpha.26";
7
7
  var dependencies = {
8
- "@dynamic-labs/sdk-api-core": "0.0.489",
8
+ "@dynamic-labs/sdk-api-core": "0.0.497",
9
9
  "@hcaptcha/react-hcaptcha": "1.4.4",
10
10
  "country-list": "2.3.0",
11
11
  formik: "2.2.9",
package/package.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use client'
2
- var version = "3.0.0-alpha.24";
2
+ var version = "3.0.0-alpha.26";
3
3
  var dependencies = {
4
- "@dynamic-labs/sdk-api-core": "0.0.489",
4
+ "@dynamic-labs/sdk-api-core": "0.0.497",
5
5
  "@hcaptcha/react-hcaptcha": "1.4.4",
6
6
  "country-list": "2.3.0",
7
7
  formik: "2.2.9",
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "3.0.0-alpha.24",
3
+ "version": "3.0.0-alpha.26",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
7
7
  "directory": "packages/sdk-react-core"
8
8
  },
9
9
  "dependencies": {
10
- "@dynamic-labs/sdk-api-core": "0.0.489",
10
+ "@dynamic-labs/sdk-api-core": "0.0.497",
11
11
  "@hcaptcha/react-hcaptcha": "1.4.4",
12
12
  "country-list": "2.3.0",
13
13
  "formik": "2.2.9",
@@ -17,15 +17,16 @@
17
17
  "react-i18next": "13.5.0",
18
18
  "yup": "0.32.11",
19
19
  "react-international-phone": "4.2.5",
20
- "@dynamic-labs/iconic": "3.0.0-alpha.24",
21
- "@dynamic-labs/logger": "3.0.0-alpha.24",
22
- "@dynamic-labs/multi-wallet": "3.0.0-alpha.24",
23
- "@dynamic-labs/rpc-providers": "3.0.0-alpha.24",
24
- "@dynamic-labs/store": "3.0.0-alpha.24",
25
- "@dynamic-labs/types": "3.0.0-alpha.24",
26
- "@dynamic-labs/utils": "3.0.0-alpha.24",
27
- "@dynamic-labs/wallet-book": "3.0.0-alpha.24",
28
- "@dynamic-labs/wallet-connector-core": "3.0.0-alpha.24",
20
+ "@dynamic-labs/iconic": "3.0.0-alpha.26",
21
+ "@dynamic-labs/logger": "3.0.0-alpha.26",
22
+ "@dynamic-labs/message-transport": "3.0.0-alpha.26",
23
+ "@dynamic-labs/multi-wallet": "3.0.0-alpha.26",
24
+ "@dynamic-labs/rpc-providers": "3.0.0-alpha.26",
25
+ "@dynamic-labs/store": "3.0.0-alpha.26",
26
+ "@dynamic-labs/types": "3.0.0-alpha.26",
27
+ "@dynamic-labs/utils": "3.0.0-alpha.26",
28
+ "@dynamic-labs/wallet-book": "3.0.0-alpha.26",
29
+ "@dynamic-labs/wallet-connector-core": "3.0.0-alpha.26",
29
30
  "eventemitter3": "5.0.1"
30
31
  },
31
32
  "devDependencies": {
@@ -1,6 +1,8 @@
1
1
  'use client'
2
2
  'use strict';
3
3
 
4
+ var sdkApiCore = require('@dynamic-labs/sdk-api-core');
5
+
4
6
  /* eslint-disable no-underscore-dangle */
5
7
  class ApiEndpoint {
6
8
  }
@@ -12,9 +14,24 @@ ApiEndpoint.getBaseUrl = () => {
12
14
  };
13
15
  ApiEndpoint.setBaseUrl = (baseUrlInput) => {
14
16
  if (!ApiEndpoint.__defined__) {
15
- ApiEndpoint.__baseUrl__ = baseUrlInput;
17
+ if (!baseUrlInput) {
18
+ /**
19
+ * If the baseUrl is not provided, use the default baseUrl from the sdk-api package
20
+ */
21
+ ApiEndpoint.__baseUrl__ = new sdkApiCore.Configuration().basePath;
22
+ }
23
+ else {
24
+ ApiEndpoint.__baseUrl__ = baseUrlInput;
25
+ }
16
26
  ApiEndpoint.__defined__ = true;
17
27
  }
28
+ else if (!baseUrlInput && ApiEndpoint.__defined__) {
29
+ /**
30
+ * If for some reason (usually in local development), the setBaseUrl is called multiple times with undefined
31
+ * And we already have it defined, let's just assume it's a no-op
32
+ */
33
+ return;
34
+ }
18
35
  else if (ApiEndpoint.__baseUrl__ !== baseUrlInput) {
19
36
  throw new Error(`ApiEndpoint baseUrl is already set to ${ApiEndpoint.__baseUrl__}, cannot change it to ${baseUrlInput}`);
20
37
  }
@@ -1,4 +1,6 @@
1
1
  'use client'
2
+ import { Configuration } from '@dynamic-labs/sdk-api-core';
3
+
2
4
  /* eslint-disable no-underscore-dangle */
3
5
  class ApiEndpoint {
4
6
  }
@@ -10,9 +12,24 @@ ApiEndpoint.getBaseUrl = () => {
10
12
  };
11
13
  ApiEndpoint.setBaseUrl = (baseUrlInput) => {
12
14
  if (!ApiEndpoint.__defined__) {
13
- ApiEndpoint.__baseUrl__ = baseUrlInput;
15
+ if (!baseUrlInput) {
16
+ /**
17
+ * If the baseUrl is not provided, use the default baseUrl from the sdk-api package
18
+ */
19
+ ApiEndpoint.__baseUrl__ = new Configuration().basePath;
20
+ }
21
+ else {
22
+ ApiEndpoint.__baseUrl__ = baseUrlInput;
23
+ }
14
24
  ApiEndpoint.__defined__ = true;
15
25
  }
26
+ else if (!baseUrlInput && ApiEndpoint.__defined__) {
27
+ /**
28
+ * If for some reason (usually in local development), the setBaseUrl is called multiple times with undefined
29
+ * And we already have it defined, let's just assume it's a no-op
30
+ */
31
+ return;
32
+ }
16
33
  else if (ApiEndpoint.__baseUrl__ !== baseUrlInput) {
17
34
  throw new Error(`ApiEndpoint baseUrl is already set to ${ApiEndpoint.__baseUrl__}, cannot change it to ${baseUrlInput}`);
18
35
  }
@@ -8,14 +8,17 @@ var React = require('react');
8
8
 
9
9
  const AccessDeniedContext = React.createContext(undefined);
10
10
  const AccessDeniedContextProvider = ({ children, }) => {
11
+ const [deniedOauthUsername, setDeniedOauthUsername] = React.useState('');
11
12
  const [deniedAddress, setDeniedAddress] = React.useState('');
12
13
  const [deniedOauthProvider, setDeniedOauthProvider] = React.useState(undefined);
13
14
  const value = React.useMemo(() => ({
14
15
  deniedAddress,
15
16
  deniedOauthProvider,
17
+ deniedOauthUsername,
16
18
  setDeniedAddress,
17
19
  setDeniedOauthProvider,
18
- }), [deniedAddress, deniedOauthProvider]);
20
+ setDeniedOauthUsername,
21
+ }), [deniedAddress, deniedOauthProvider, deniedOauthUsername]);
19
22
  return (jsxRuntime.jsx(AccessDeniedContext.Provider, { value: value, children: children }));
20
23
  };
21
24
  const useAccessDeniedContext = () => {
@@ -3,8 +3,10 @@ import { ProviderEnum } from '@dynamic-labs/sdk-api-core';
3
3
  export type AccessDeniedContextType = {
4
4
  deniedAddress: string;
5
5
  setDeniedAddress(address: string): void;
6
+ setDeniedOauthUsername(username: string): void;
6
7
  setDeniedOauthProvider(deniedOauthProvider: ProviderEnum | undefined): void;
7
8
  deniedOauthProvider: ProviderEnum | undefined;
9
+ deniedOauthUsername: string;
8
10
  };
9
11
  export declare const AccessDeniedContext: import("react").Context<AccessDeniedContextType | undefined>;
10
12
  export declare const AccessDeniedContextProvider: ({ children, }: {
@@ -4,14 +4,17 @@ import { createContext, useContext, useState, useMemo } from 'react';
4
4
 
5
5
  const AccessDeniedContext = createContext(undefined);
6
6
  const AccessDeniedContextProvider = ({ children, }) => {
7
+ const [deniedOauthUsername, setDeniedOauthUsername] = useState('');
7
8
  const [deniedAddress, setDeniedAddress] = useState('');
8
9
  const [deniedOauthProvider, setDeniedOauthProvider] = useState(undefined);
9
10
  const value = useMemo(() => ({
10
11
  deniedAddress,
11
12
  deniedOauthProvider,
13
+ deniedOauthUsername,
12
14
  setDeniedAddress,
13
15
  setDeniedOauthProvider,
14
- }), [deniedAddress, deniedOauthProvider]);
16
+ setDeniedOauthUsername,
17
+ }), [deniedAddress, deniedOauthProvider, deniedOauthUsername]);
15
18
  return (jsx(AccessDeniedContext.Provider, { value: value, children: children }));
16
19
  };
17
20
  const useAccessDeniedContext = () => {
@@ -145,7 +145,7 @@ const DynamicContext = React.createContext(undefined);
145
145
  /** The context provider itself we only use internally */
146
146
  const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, locale: locale$1, enableInstrumentation = false, }) => {
147
147
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
148
- 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;
148
+ 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;
149
149
  localStorage.LocalStorage.setSuffix(settings$1.localStorageSuffix);
150
150
  /**
151
151
  * initialize global store
@@ -141,7 +141,7 @@ const DynamicContext = createContext(undefined);
141
141
  /** The context provider itself we only use internally */
142
142
  const InnerDynamicContextProvider = ({ children, theme, settings, locale, enableInstrumentation = false, }) => {
143
143
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
144
- 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;
144
+ 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;
145
145
  LocalStorage.setSuffix(settings.localStorageSuffix);
146
146
  /**
147
147
  * initialize global store
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { CountryIso2 } from 'react-international-phone';
3
3
  import { LogLevel } from '@dynamic-labs/logger';
4
- import { type CoinbaseWalletPreference, type SocialProviderFilter } from '@dynamic-labs/types';
4
+ import { type MobileExperience, type CoinbaseWalletPreference, type SocialProviderFilter } from '@dynamic-labs/types';
5
5
  import { DeepLinkVariant, WalletConnectorExtension, WalletConnectorsMethod } from '@dynamic-labs/wallet-connector-core';
6
6
  import { LocaleResource } from '../../../locale';
7
7
  import { AccessDeniedCustomButton, AuthModeType, ChainToWalletMap, DynamicEventsCallbacks, RecommendedWallet, WalletOption } from '../../../shared';
@@ -63,7 +63,7 @@ export interface DynamicContextProps {
63
63
  * @default WARN
64
64
  */
65
65
  logLevel?: keyof typeof LogLevel;
66
- mobileExperience?: 'in-app-browser' | 'redirect';
66
+ mobileExperience?: MobileExperience;
67
67
  networkValidationMode?: NetworkValidationMode;
68
68
  newToWeb3WalletChainMap?: ChainToWalletMap;
69
69
  notInTheListImageUrl?: string;
@@ -2,7 +2,7 @@ import { Dispatch, MutableRefObject, ReactNode, SetStateAction } from 'react';
2
2
  import { changeLanguage } from 'i18next';
3
3
  import { CountryIso2 } from 'react-international-phone';
4
4
  import { NameServiceData, ProjectSettings } from '@dynamic-labs/sdk-api-core';
5
- import { NetworkConfigurationMap, SocialProviderFilter, UserProfile, WalletUiUtils } from '@dynamic-labs/types';
5
+ import { MobileExperience, NetworkConfigurationMap, SocialProviderFilter, UserProfile, WalletUiUtils } from '@dynamic-labs/types';
6
6
  import { Chain, GetAddressOpts, WalletConnector } from '@dynamic-labs/wallet-connector-core';
7
7
  import { PasskeySuccessEnum } from '../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner';
8
8
  import { AccessDeniedCustomButton, AccountSwitchState, AuthModeType, AwaitingSignatureState, ChainToWalletMap, DynamicEventsCallbacks, MultiWalletWidgetState, RecommendedWallet, Wallet, WalletOption, WalletWithAction } from '../../../shared';
@@ -88,6 +88,7 @@ export interface IDynamicContext {
88
88
  multiAsset: boolean;
89
89
  multiWallet: boolean;
90
90
  multiWalletWidgetState: MultiWalletWidgetState;
91
+ mobileExperience?: MobileExperience;
91
92
  networkValidationMode: NetworkValidationMode;
92
93
  network: number | string | undefined;
93
94
  networkConfigurations: NetworkConfigurationMap | undefined;
@@ -39,6 +39,7 @@ require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.c
39
39
  require('@dynamic-labs/types');
40
40
  require('../AccountExistsContext/AccountExistsContext.cjs');
41
41
  require('../LoadingContext/LoadingContext.cjs');
42
+ require('../AccessDeniedContext/AccessDeniedContext.cjs');
42
43
  require('yup');
43
44
  require('../MockContext/MockContext.cjs');
44
45
  require('../../views/CollectUserDataView/useFields.cjs');
@@ -64,7 +65,6 @@ require('../../components/Popper/Popper/Popper.cjs');
64
65
  require('../../components/Popper/PopperContext/PopperContext.cjs');
65
66
  require('react-focus-lock');
66
67
  require('qrcode');
67
- require('../AccessDeniedContext/AccessDeniedContext.cjs');
68
68
  require('formik');
69
69
  require('../../views/WalletList/WalletList.cjs');
70
70
  require('../SocialRedirectContext/SocialRedirectContext.cjs');
@@ -35,6 +35,7 @@ import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js
35
35
  import '@dynamic-labs/types';
36
36
  import '../AccountExistsContext/AccountExistsContext.js';
37
37
  import '../LoadingContext/LoadingContext.js';
38
+ import '../AccessDeniedContext/AccessDeniedContext.js';
38
39
  import 'yup';
39
40
  import '../MockContext/MockContext.js';
40
41
  import '../../views/CollectUserDataView/useFields.js';
@@ -60,7 +61,6 @@ import '../../components/Popper/Popper/Popper.js';
60
61
  import '../../components/Popper/PopperContext/PopperContext.js';
61
62
  import 'react-focus-lock';
62
63
  import 'qrcode';
63
- import '../AccessDeniedContext/AccessDeniedContext.js';
64
64
  import 'formik';
65
65
  import '../../views/WalletList/WalletList.js';
66
66
  import '../SocialRedirectContext/SocialRedirectContext.js';
@@ -39,6 +39,7 @@ require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.c
39
39
  require('@dynamic-labs/types');
40
40
  require('../AccountExistsContext/AccountExistsContext.cjs');
41
41
  require('../LoadingContext/LoadingContext.cjs');
42
+ require('../AccessDeniedContext/AccessDeniedContext.cjs');
42
43
  require('yup');
43
44
  require('../MockContext/MockContext.cjs');
44
45
  require('../../views/CollectUserDataView/useFields.cjs');
@@ -64,7 +65,6 @@ require('../../components/Popper/Popper/Popper.cjs');
64
65
  require('../../components/Popper/PopperContext/PopperContext.cjs');
65
66
  require('react-focus-lock');
66
67
  require('qrcode');
67
- require('../AccessDeniedContext/AccessDeniedContext.cjs');
68
68
  require('formik');
69
69
  require('../../views/WalletList/WalletList.cjs');
70
70
  require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
@@ -35,6 +35,7 @@ import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js
35
35
  import '@dynamic-labs/types';
36
36
  import '../AccountExistsContext/AccountExistsContext.js';
37
37
  import '../LoadingContext/LoadingContext.js';
38
+ import '../AccessDeniedContext/AccessDeniedContext.js';
38
39
  import 'yup';
39
40
  import '../MockContext/MockContext.js';
40
41
  import '../../views/CollectUserDataView/useFields.js';
@@ -60,7 +61,6 @@ import '../../components/Popper/Popper/Popper.js';
60
61
  import '../../components/Popper/PopperContext/PopperContext.js';
61
62
  import 'react-focus-lock';
62
63
  import 'qrcode';
63
- import '../AccessDeniedContext/AccessDeniedContext.js';
64
64
  import 'formik';
65
65
  import '../../views/WalletList/WalletList.js';
66
66
  import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
@@ -62,7 +62,7 @@ const unlinkOAuth = (_b) => _tslib.__awaiter(void 0, [_b], void 0, function* ({
62
62
  }
63
63
  });
64
64
  const signInOAuth = (environmentId_2, providerType_2, _c) => _tslib.__awaiter(void 0, [environmentId_2, providerType_2, _c], void 0, function* (environmentId, providerType, { code, codeVerifier, state, captchaToken }) {
65
- var _d;
65
+ var _d, _e, _f;
66
66
  const oauthRequest = {
67
67
  captchaToken,
68
68
  code,
@@ -86,7 +86,9 @@ const signInOAuth = (environmentId_2, providerType_2, _c) => _tslib.__awaiter(vo
86
86
  }
87
87
  if (data.error.code === 'missing_from_list') {
88
88
  throw new utils.NoAccessError({
89
- walletPublicKey: (_d = data === null || data === void 0 ? void 0 : data.payload) === null || _d === void 0 ? void 0 : _d.walletPublicKey,
89
+ socialProvider: (_d = data === null || data === void 0 ? void 0 : data.payload) === null || _d === void 0 ? void 0 : _d.socialProvider,
90
+ socialUsername: (_e = data === null || data === void 0 ? void 0 : data.payload) === null || _e === void 0 ? void 0 : _e.socialUsername,
91
+ walletPublicKey: (_f = data === null || data === void 0 ? void 0 : data.payload) === null || _f === void 0 ? void 0 : _f.walletPublicKey,
90
92
  });
91
93
  }
92
94
  if (data.code === 'email_associated_with_different_provider') {
@@ -95,7 +97,7 @@ const signInOAuth = (environmentId_2, providerType_2, _c) => _tslib.__awaiter(vo
95
97
  return undefined;
96
98
  }
97
99
  });
98
- const getOAuthResult = (environmentId_3, providerType_3, _e) => _tslib.__awaiter(void 0, [environmentId_3, providerType_3, _e], void 0, function* (environmentId, providerType, { state }) {
100
+ const getOAuthResult = (environmentId_3, providerType_3, _g) => _tslib.__awaiter(void 0, [environmentId_3, providerType_3, _g], void 0, function* (environmentId, providerType, { state }) {
99
101
  const oauthResultRequest = {
100
102
  state,
101
103
  };
@@ -113,6 +115,7 @@ const getOAuthResult = (environmentId_3, providerType_3, _e) => _tslib.__awaiter
113
115
  }
114
116
  });
115
117
  const farcasterSignIn = (environmentId, farcasterSignInRequest) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
118
+ var _h, _j;
116
119
  try {
117
120
  const response = yield api.sdkApi().farcasterSignIn({
118
121
  environmentId,
@@ -129,6 +132,8 @@ const farcasterSignIn = (environmentId, farcasterSignInRequest) => _tslib.__awai
129
132
  }
130
133
  if (data.error.code === 'missing_from_list') {
131
134
  throw new utils.NoAccessError({
135
+ socialProvider: (_h = data === null || data === void 0 ? void 0 : data.payload) === null || _h === void 0 ? void 0 : _h.socialProvider,
136
+ socialUsername: (_j = data === null || data === void 0 ? void 0 : data.payload) === null || _j === void 0 ? void 0 : _j.socialUsername,
132
137
  walletPublicKey: data.payload.walletPublicKey,
133
138
  });
134
139
  }
@@ -58,7 +58,7 @@ const unlinkOAuth = (_b) => __awaiter(void 0, [_b], void 0, function* ({ environ
58
58
  }
59
59
  });
60
60
  const signInOAuth = (environmentId_2, providerType_2, _c) => __awaiter(void 0, [environmentId_2, providerType_2, _c], void 0, function* (environmentId, providerType, { code, codeVerifier, state, captchaToken }) {
61
- var _d;
61
+ var _d, _e, _f;
62
62
  const oauthRequest = {
63
63
  captchaToken,
64
64
  code,
@@ -82,7 +82,9 @@ const signInOAuth = (environmentId_2, providerType_2, _c) => __awaiter(void 0, [
82
82
  }
83
83
  if (data.error.code === 'missing_from_list') {
84
84
  throw new NoAccessError({
85
- walletPublicKey: (_d = data === null || data === void 0 ? void 0 : data.payload) === null || _d === void 0 ? void 0 : _d.walletPublicKey,
85
+ socialProvider: (_d = data === null || data === void 0 ? void 0 : data.payload) === null || _d === void 0 ? void 0 : _d.socialProvider,
86
+ socialUsername: (_e = data === null || data === void 0 ? void 0 : data.payload) === null || _e === void 0 ? void 0 : _e.socialUsername,
87
+ walletPublicKey: (_f = data === null || data === void 0 ? void 0 : data.payload) === null || _f === void 0 ? void 0 : _f.walletPublicKey,
86
88
  });
87
89
  }
88
90
  if (data.code === 'email_associated_with_different_provider') {
@@ -91,7 +93,7 @@ const signInOAuth = (environmentId_2, providerType_2, _c) => __awaiter(void 0, [
91
93
  return undefined;
92
94
  }
93
95
  });
94
- const getOAuthResult = (environmentId_3, providerType_3, _e) => __awaiter(void 0, [environmentId_3, providerType_3, _e], void 0, function* (environmentId, providerType, { state }) {
96
+ const getOAuthResult = (environmentId_3, providerType_3, _g) => __awaiter(void 0, [environmentId_3, providerType_3, _g], void 0, function* (environmentId, providerType, { state }) {
95
97
  const oauthResultRequest = {
96
98
  state,
97
99
  };
@@ -109,6 +111,7 @@ const getOAuthResult = (environmentId_3, providerType_3, _e) => __awaiter(void 0
109
111
  }
110
112
  });
111
113
  const farcasterSignIn = (environmentId, farcasterSignInRequest) => __awaiter(void 0, void 0, void 0, function* () {
114
+ var _h, _j;
112
115
  try {
113
116
  const response = yield sdkApi().farcasterSignIn({
114
117
  environmentId,
@@ -125,6 +128,8 @@ const farcasterSignIn = (environmentId, farcasterSignInRequest) => __awaiter(voi
125
128
  }
126
129
  if (data.error.code === 'missing_from_list') {
127
130
  throw new NoAccessError({
131
+ socialProvider: (_h = data === null || data === void 0 ? void 0 : data.payload) === null || _h === void 0 ? void 0 : _h.socialProvider,
132
+ socialUsername: (_j = data === null || data === void 0 ? void 0 : data.payload) === null || _j === void 0 ? void 0 : _j.socialUsername,
128
133
  walletPublicKey: data.payload.walletPublicKey,
129
134
  });
130
135
  }
@@ -20,11 +20,15 @@ require('@dynamic-labs/utils');
20
20
  require('../../../shared/consts/index.cjs');
21
21
  var api = require('../api.cjs');
22
22
  var helpers = require('../../../context/DynamicContext/helpers/helpers.cjs');
23
+ var version = require('../../../../version.cjs');
23
24
 
24
25
  const fetchProjectSettings = (environmentId) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
25
26
  try {
26
27
  const res = yield api.sdkApi().getEnvironmentSettings({
27
28
  environmentId,
29
+ sdkVersion: `WalletKit/${version.VERSION}`,
30
+ }, {
31
+ credentials: 'omit',
28
32
  });
29
33
  return res;
30
34
  }
@@ -16,11 +16,15 @@ import '@dynamic-labs/utils';
16
16
  import '../../../shared/consts/index.js';
17
17
  import { sdkApi } from '../api.js';
18
18
  import { isDynamicContextSessionSettingExpired, setDynamicContextSessionSettings, isWagmiSessionSettingExpired, setWagmiSessionSettings } from '../../../context/DynamicContext/helpers/helpers.js';
19
+ import { VERSION } from '../../../../version.js';
19
20
 
20
21
  const fetchProjectSettings = (environmentId) => __awaiter(void 0, void 0, void 0, function* () {
21
22
  try {
22
23
  const res = yield sdkApi().getEnvironmentSettings({
23
24
  environmentId,
25
+ sdkVersion: `WalletKit/${VERSION}`,
26
+ }, {
27
+ credentials: 'omit',
24
28
  });
25
29
  return res;
26
30
  }
@@ -42,6 +42,7 @@ require('../../useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
42
42
  require('@dynamic-labs/types');
43
43
  require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
44
44
  require('../../../../context/LoadingContext/LoadingContext.cjs');
45
+ require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
45
46
  require('yup');
46
47
  require('../../../../context/MockContext/MockContext.cjs');
47
48
  require('../../../../views/CollectUserDataView/useFields.cjs');
@@ -67,7 +68,6 @@ require('../../../../components/Popper/Popper/Popper.cjs');
67
68
  require('../../../../components/Popper/PopperContext/PopperContext.cjs');
68
69
  require('react-focus-lock');
69
70
  require('qrcode');
70
- require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
71
71
  require('formik');
72
72
  require('../../../../views/WalletList/WalletList.cjs');
73
73
  require('../../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
@@ -38,6 +38,7 @@ import '../../useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
38
38
  import '@dynamic-labs/types';
39
39
  import '../../../../context/AccountExistsContext/AccountExistsContext.js';
40
40
  import '../../../../context/LoadingContext/LoadingContext.js';
41
+ import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
41
42
  import 'yup';
42
43
  import '../../../../context/MockContext/MockContext.js';
43
44
  import '../../../../views/CollectUserDataView/useFields.js';
@@ -63,7 +64,6 @@ import '../../../../components/Popper/Popper/Popper.js';
63
64
  import '../../../../components/Popper/PopperContext/PopperContext.js';
64
65
  import 'react-focus-lock';
65
66
  import 'qrcode';
66
- import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
67
67
  import 'formik';
68
68
  import '../../../../views/WalletList/WalletList.js';
69
69
  import '../../../../context/SocialRedirectContext/SocialRedirectContext.js';
@@ -42,6 +42,7 @@ require('../../useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
42
42
  require('@dynamic-labs/types');
43
43
  require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
44
44
  require('../../../../context/LoadingContext/LoadingContext.cjs');
45
+ require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
45
46
  require('yup');
46
47
  require('../../../../context/MockContext/MockContext.cjs');
47
48
  require('../../../../views/CollectUserDataView/useFields.cjs');
@@ -67,7 +68,6 @@ require('../../../../components/Popper/Popper/Popper.cjs');
67
68
  require('../../../../components/Popper/PopperContext/PopperContext.cjs');
68
69
  require('react-focus-lock');
69
70
  require('qrcode');
70
- require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
71
71
  require('formik');
72
72
  require('../../../../views/WalletList/WalletList.cjs');
73
73
  require('../../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
@@ -38,6 +38,7 @@ import '../../useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
38
38
  import '@dynamic-labs/types';
39
39
  import '../../../../context/AccountExistsContext/AccountExistsContext.js';
40
40
  import '../../../../context/LoadingContext/LoadingContext.js';
41
+ import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
41
42
  import 'yup';
42
43
  import '../../../../context/MockContext/MockContext.js';
43
44
  import '../../../../views/CollectUserDataView/useFields.js';
@@ -63,7 +64,6 @@ import '../../../../components/Popper/Popper/Popper.js';
63
64
  import '../../../../components/Popper/PopperContext/PopperContext.js';
64
65
  import 'react-focus-lock';
65
66
  import 'qrcode';
66
- import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
67
67
  import 'formik';
68
68
  import '../../../../views/WalletList/WalletList.js';
69
69
  import '../../../../context/SocialRedirectContext/SocialRedirectContext.js';
@@ -36,6 +36,7 @@ require('../../useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
36
36
  require('@dynamic-labs/types');
37
37
  require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
38
38
  require('../../../../context/LoadingContext/LoadingContext.cjs');
39
+ require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
39
40
  require('yup');
40
41
  require('../../../../context/MockContext/MockContext.cjs');
41
42
  require('../../../../views/CollectUserDataView/useFields.cjs');
@@ -61,7 +62,6 @@ require('../../../../components/Popper/Popper/Popper.cjs');
61
62
  require('../../../../components/Popper/PopperContext/PopperContext.cjs');
62
63
  require('react-focus-lock');
63
64
  require('qrcode');
64
- require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
65
65
  require('formik');
66
66
  require('../../../../views/WalletList/WalletList.cjs');
67
67
  require('../../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
@@ -32,6 +32,7 @@ import '../../useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
32
32
  import '@dynamic-labs/types';
33
33
  import '../../../../context/AccountExistsContext/AccountExistsContext.js';
34
34
  import '../../../../context/LoadingContext/LoadingContext.js';
35
+ import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
35
36
  import 'yup';
36
37
  import '../../../../context/MockContext/MockContext.js';
37
38
  import '../../../../views/CollectUserDataView/useFields.js';
@@ -57,7 +58,6 @@ import '../../../../components/Popper/Popper/Popper.js';
57
58
  import '../../../../components/Popper/PopperContext/PopperContext.js';
58
59
  import 'react-focus-lock';
59
60
  import 'qrcode';
60
- import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
61
61
  import 'formik';
62
62
  import '../../../../views/WalletList/WalletList.js';
63
63
  import '../../../../context/SocialRedirectContext/SocialRedirectContext.js';
@@ -30,7 +30,7 @@ var storeAuthTokenAndUser = require('../../../store/utils/storeAuthTokenAndUser/
30
30
  var mfa = require('../../../data/api/mfa/mfa.cjs');
31
31
  require('../../../locale/locale.cjs');
32
32
  require('@dynamic-labs/store');
33
- require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
33
+ var AccessDeniedContext = require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
34
34
  require('../../../context/UserWalletsContext/UserWalletsContext.cjs');
35
35
  require('../../../context/VerificationContext/VerificationContext.cjs');
36
36
  require('react-dom');
@@ -95,6 +95,7 @@ var useInternalDynamicContext = require('../../../context/DynamicContext/useDyna
95
95
  const sleepToShowSuccessMessage = () => utils.sleep(1500);
96
96
  const useUserAuth = ({ authMethod, }) => {
97
97
  const { handleLogOut, setShowAuthFlow, setCallback, setMultiWalletWidgetState, environmentId, walletConnectorOptions, } = useInternalDynamicContext.useInternalDynamicContext();
98
+ const { setDeniedOauthUsername, setDeniedOauthProvider } = AccessDeniedContext.useAccessDeniedContext();
98
99
  const { view, setView, goToInitialView } = ViewContext.useViewContext();
99
100
  const { setLoading } = LoadingContext.useLoadingContext();
100
101
  const { setErrorMessage, setError } = ErrorContext.useErrorContext();
@@ -169,6 +170,7 @@ const useUserAuth = ({ authMethod, }) => {
169
170
  }
170
171
  });
171
172
  const handleAuthError = (error, { options = {}, onError, }) => {
173
+ var _a;
172
174
  if (error instanceof utils.MfaInvalidOtpError) {
173
175
  throw error;
174
176
  }
@@ -180,6 +182,8 @@ const useUserAuth = ({ authMethod, }) => {
180
182
  error instanceof utils.InvalidPhoneNumberError)
181
183
  throw error;
182
184
  if (error instanceof utils.NoAccessError) {
185
+ setDeniedOauthProvider(error === null || error === void 0 ? void 0 : error.socialProvider);
186
+ setDeniedOauthUsername((_a = error === null || error === void 0 ? void 0 : error.socialUsername) !== null && _a !== void 0 ? _a : '');
183
187
  setView('no-access');
184
188
  return;
185
189
  }
@@ -26,7 +26,7 @@ import { storeAuthTokenAndUser } from '../../../store/utils/storeAuthTokenAndUse
26
26
  import { getUserMfaDevices } from '../../../data/api/mfa/mfa.js';
27
27
  import '../../../locale/locale.js';
28
28
  import '@dynamic-labs/store';
29
- import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
29
+ import { useAccessDeniedContext } from '../../../context/AccessDeniedContext/AccessDeniedContext.js';
30
30
  import '../../../context/UserWalletsContext/UserWalletsContext.js';
31
31
  import '../../../context/VerificationContext/VerificationContext.js';
32
32
  import 'react-dom';
@@ -91,6 +91,7 @@ import { useInternalDynamicContext } from '../../../context/DynamicContext/useDy
91
91
  const sleepToShowSuccessMessage = () => sleep(1500);
92
92
  const useUserAuth = ({ authMethod, }) => {
93
93
  const { handleLogOut, setShowAuthFlow, setCallback, setMultiWalletWidgetState, environmentId, walletConnectorOptions, } = useInternalDynamicContext();
94
+ const { setDeniedOauthUsername, setDeniedOauthProvider } = useAccessDeniedContext();
94
95
  const { view, setView, goToInitialView } = useViewContext();
95
96
  const { setLoading } = useLoadingContext();
96
97
  const { setErrorMessage, setError } = useErrorContext();
@@ -165,6 +166,7 @@ const useUserAuth = ({ authMethod, }) => {
165
166
  }
166
167
  });
167
168
  const handleAuthError = (error, { options = {}, onError, }) => {
169
+ var _a;
168
170
  if (error instanceof MfaInvalidOtpError) {
169
171
  throw error;
170
172
  }
@@ -176,6 +178,8 @@ const useUserAuth = ({ authMethod, }) => {
176
178
  error instanceof InvalidPhoneNumberError)
177
179
  throw error;
178
180
  if (error instanceof NoAccessError) {
181
+ setDeniedOauthProvider(error === null || error === void 0 ? void 0 : error.socialProvider);
182
+ setDeniedOauthUsername((_a = error === null || error === void 0 ? void 0 : error.socialUsername) !== null && _a !== void 0 ? _a : '');
179
183
  setView('no-access');
180
184
  return;
181
185
  }
@@ -1,5 +1,5 @@
1
1
  import { ProjectSettings } from '@dynamic-labs/sdk-api-core';
2
- import { type CoinbaseWalletPreference, type NetworkConfigurationMap, type WalletUiUtils } from '@dynamic-labs/types';
2
+ import { type MobileExperience, type CoinbaseWalletPreference, type NetworkConfigurationMap, type WalletUiUtils } from '@dynamic-labs/types';
3
3
  import { DeepLinkVariant, WalletConnector, WalletConnectorExtension, WalletConnectorsMethod } from '@dynamic-labs/wallet-connector-core';
4
4
  import { WalletBookSchema } from '@dynamic-labs/wallet-book';
5
5
  type Props = {
@@ -8,7 +8,7 @@ type Props = {
8
8
  coinbaseWalletPreference?: CoinbaseWalletPreference;
9
9
  deepLinkPreference?: DeepLinkVariant;
10
10
  flowNetwork?: 'mainnet' | 'testnet';
11
- mobileExperience?: 'in-app-browser' | 'redirect';
11
+ mobileExperience?: MobileExperience;
12
12
  networkConfigurations: NetworkConfigurationMap | undefined;
13
13
  projectSettings: ProjectSettings | undefined;
14
14
  walletBook: WalletBookSchema;
@@ -99,8 +99,9 @@ require('../../components/InlineWidget/InlineWidget.cjs');
99
99
  require('qrcode');
100
100
 
101
101
  const NoAccess = () => {
102
- const { deniedAddress, setDeniedAddress, setDeniedOauthProvider } = AccessDeniedContext.useAccessDeniedContext();
102
+ const { deniedAddress, setDeniedAddress, setDeniedOauthProvider, deniedOauthProvider, deniedOauthUsername, } = AccessDeniedContext.useAccessDeniedContext();
103
103
  const { t } = reactI18next.useTranslation();
104
+ const accessIcon = iconic.findSocialIcon(deniedOauthProvider);
104
105
  const { selectedWalletConnector: walletConnector, socialMediaIconUrl, notInTheListImageUrl, accessDeniedButton, } = useInternalDynamicContext.useInternalDynamicContext();
105
106
  const { displayedDestination: email } = VerificationContext.useVerification();
106
107
  const { goToInitialView } = ViewContext.useViewContext();
@@ -118,15 +119,16 @@ const NoAccess = () => {
118
119
  if (walletConnector) {
119
120
  return jsxRuntime.jsx(AuthProviderIcon.AuthProviderIcon, {});
120
121
  }
121
- return (jsxRuntime.jsx(IconWithStatus.IconWithStatus, { containerClassName: 'wallet-no-access__icon--verified', Icon: iconic.SignInWithEmailIcon, iconSize: 50, InnerIcon: error.ReactComponent, variant: 'red' }));
122
- }, [walletConnector]);
122
+ return (jsxRuntime.jsx(IconWithStatus.IconWithStatus, { containerClassName: 'wallet-no-access__icon--verified', Icon: accessIcon !== null && accessIcon !== void 0 ? accessIcon : iconic.SignInWithEmailIcon, iconSize: 50, InnerIcon: error.ReactComponent, variant: 'red' }));
123
+ }, [accessIcon, walletConnector]);
123
124
  const formattedAddress = shortenWalletAddress.shortenWalletAddress(deniedAddress, 6, 4);
124
125
  const buttonTitle = (accessDeniedButton === null || accessDeniedButton === void 0 ? void 0 : accessDeniedButton.title) || _buttonTitle;
125
126
  const buttonAction = (accessDeniedButton === null || accessDeniedButton === void 0 ? void 0 : accessDeniedButton.action) || handleChangeWallet;
126
127
  const emailOrAddress = email !== null && email !== void 0 ? email : formattedAddress;
128
+ const correctDisplay = deniedOauthProvider === undefined ? emailOrAddress : deniedOauthUsername;
127
129
  const showNoInTheListImage = Boolean(notInTheListImageUrl) && (isAccessListView || isGateBlockedView);
128
130
  const showSocialMediaIcon = SocialMediaIcon && (isAccessListView || isGateBlockedView);
129
- return (jsxRuntime.jsxs("div", { className: 'wallet-no-access__container', children: [showNoInTheListImage && (jsxRuntime.jsx("img", { src: notInTheListImageUrl, alt: t('dyn_no_access.not_in_the_list_image_alt'), className: 'wallet-no-access__image', copykey: 'dyn_no_access.not_in_the_list_image_alt' })), jsxRuntime.jsxs("div", { className: 'wallet-no-access__main', children: [jsxRuntime.jsxs("div", { className: 'wallet-no-access__user-info-container', children: [Icon, jsxRuntime.jsxs("div", { "data-testid": 'walletAddress', className: 'wallet-no-access__wallet-address-container', children: [walletConnector && (jsxRuntime.jsx(StatusDot.StatusDot, { variant: 'red', containerClassName: 'user-info__status-dot' })), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', weight: 'medium', className: 'wallet-no-access__wallet-address', children: emailOrAddress })] })] }), jsxRuntime.jsxs("div", { className: 'wallet-no-access__content', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', className: 'wallet-no-access__content--primary', children: title }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'wallet-no-access__content--secondary', children: subtitle })] }), jsxRuntime.jsx(TypographyButton.TypographyButton, { onClick: buttonAction, className: 'wallet-no-access__button--primary', expanded: true, buttonPadding: 'large', children: buttonTitle }), _socialMediaUrl && _socialMediaLinkText && (jsxRuntime.jsxs("div", { className: 'wallet-no-access__social-info-container', children: [jsxRuntime.jsxs("a", { href: _socialMediaUrl, className: 'wallet-no-access__waitlist-link', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'button_primary', color: 'primary', children: _socialMediaLinkText }), showSocialMediaIcon && (jsxRuntime.jsx(SocialMediaIcon, { className: 'wallet-no-access__social-icon', style: {
131
+ return (jsxRuntime.jsxs("div", { className: 'wallet-no-access__container', children: [showNoInTheListImage && (jsxRuntime.jsx("img", { src: notInTheListImageUrl, alt: t('dyn_no_access.not_in_the_list_image_alt'), className: 'wallet-no-access__image', copykey: 'dyn_no_access.not_in_the_list_image_alt' })), jsxRuntime.jsxs("div", { className: 'wallet-no-access__main', children: [jsxRuntime.jsxs("div", { className: 'wallet-no-access__user-info-container', children: [Icon, jsxRuntime.jsxs("div", { "data-testid": 'walletAddress', className: 'wallet-no-access__wallet-address-container', children: [walletConnector && (jsxRuntime.jsx(StatusDot.StatusDot, { variant: 'red', containerClassName: 'user-info__status-dot' })), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', weight: 'medium', className: 'wallet-no-access__wallet-address', children: correctDisplay })] })] }), jsxRuntime.jsxs("div", { className: 'wallet-no-access__content', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', className: 'wallet-no-access__content--primary', children: title }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'wallet-no-access__content--secondary', children: subtitle })] }), jsxRuntime.jsx(TypographyButton.TypographyButton, { onClick: buttonAction, className: 'wallet-no-access__button--primary', expanded: true, buttonPadding: 'large', children: buttonTitle }), _socialMediaUrl && _socialMediaLinkText && (jsxRuntime.jsxs("div", { className: 'wallet-no-access__social-info-container', children: [jsxRuntime.jsxs("a", { href: _socialMediaUrl, className: 'wallet-no-access__waitlist-link', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'button_primary', color: 'primary', children: _socialMediaLinkText }), showSocialMediaIcon && (jsxRuntime.jsx(SocialMediaIcon, { className: 'wallet-no-access__social-icon', style: {
130
132
  height: pixelToRem.pixelToRem(24),
131
133
  width: pixelToRem.pixelToRem(24),
132
134
  } }))] }), typeof socialMediaIconUrl === 'string' && (jsxRuntime.jsx("img", { alt: 'social media', src: socialMediaIconUrl, style: {
@@ -2,7 +2,7 @@
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import { useMemo } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
5
- import { SignInWithEmailIcon } from '@dynamic-labs/iconic';
5
+ import { findSocialIcon, SignInWithEmailIcon } from '@dynamic-labs/iconic';
6
6
  import '../../components/Accordion/components/AccordionItem/AccordionItem.js';
7
7
  import '../../components/Alert/Alert.js';
8
8
  import '../../events/dynamicEvents.js';
@@ -95,8 +95,9 @@ import '../../components/InlineWidget/InlineWidget.js';
95
95
  import 'qrcode';
96
96
 
97
97
  const NoAccess = () => {
98
- const { deniedAddress, setDeniedAddress, setDeniedOauthProvider } = useAccessDeniedContext();
98
+ const { deniedAddress, setDeniedAddress, setDeniedOauthProvider, deniedOauthProvider, deniedOauthUsername, } = useAccessDeniedContext();
99
99
  const { t } = useTranslation();
100
+ const accessIcon = findSocialIcon(deniedOauthProvider);
100
101
  const { selectedWalletConnector: walletConnector, socialMediaIconUrl, notInTheListImageUrl, accessDeniedButton, } = useInternalDynamicContext();
101
102
  const { displayedDestination: email } = useVerification();
102
103
  const { goToInitialView } = useViewContext();
@@ -114,15 +115,16 @@ const NoAccess = () => {
114
115
  if (walletConnector) {
115
116
  return jsx(AuthProviderIcon, {});
116
117
  }
117
- return (jsx(IconWithStatus, { containerClassName: 'wallet-no-access__icon--verified', Icon: SignInWithEmailIcon, iconSize: 50, InnerIcon: SvgError, variant: 'red' }));
118
- }, [walletConnector]);
118
+ return (jsx(IconWithStatus, { containerClassName: 'wallet-no-access__icon--verified', Icon: accessIcon !== null && accessIcon !== void 0 ? accessIcon : SignInWithEmailIcon, iconSize: 50, InnerIcon: SvgError, variant: 'red' }));
119
+ }, [accessIcon, walletConnector]);
119
120
  const formattedAddress = shortenWalletAddress(deniedAddress, 6, 4);
120
121
  const buttonTitle = (accessDeniedButton === null || accessDeniedButton === void 0 ? void 0 : accessDeniedButton.title) || _buttonTitle;
121
122
  const buttonAction = (accessDeniedButton === null || accessDeniedButton === void 0 ? void 0 : accessDeniedButton.action) || handleChangeWallet;
122
123
  const emailOrAddress = email !== null && email !== void 0 ? email : formattedAddress;
124
+ const correctDisplay = deniedOauthProvider === undefined ? emailOrAddress : deniedOauthUsername;
123
125
  const showNoInTheListImage = Boolean(notInTheListImageUrl) && (isAccessListView || isGateBlockedView);
124
126
  const showSocialMediaIcon = SocialMediaIcon && (isAccessListView || isGateBlockedView);
125
- return (jsxs("div", { className: 'wallet-no-access__container', children: [showNoInTheListImage && (jsx("img", { src: notInTheListImageUrl, alt: t('dyn_no_access.not_in_the_list_image_alt'), className: 'wallet-no-access__image', copykey: 'dyn_no_access.not_in_the_list_image_alt' })), jsxs("div", { className: 'wallet-no-access__main', children: [jsxs("div", { className: 'wallet-no-access__user-info-container', children: [Icon, jsxs("div", { "data-testid": 'walletAddress', className: 'wallet-no-access__wallet-address-container', children: [walletConnector && (jsx(StatusDot, { variant: 'red', containerClassName: 'user-info__status-dot' })), jsx(Typography, { variant: 'body_normal', color: 'primary', weight: 'medium', className: 'wallet-no-access__wallet-address', children: emailOrAddress })] })] }), jsxs("div", { className: 'wallet-no-access__content', children: [jsx(Typography, { variant: 'title', color: 'primary', className: 'wallet-no-access__content--primary', children: title }), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'wallet-no-access__content--secondary', children: subtitle })] }), jsx(TypographyButton, { onClick: buttonAction, className: 'wallet-no-access__button--primary', expanded: true, buttonPadding: 'large', children: buttonTitle }), _socialMediaUrl && _socialMediaLinkText && (jsxs("div", { className: 'wallet-no-access__social-info-container', children: [jsxs("a", { href: _socialMediaUrl, className: 'wallet-no-access__waitlist-link', children: [jsx(Typography, { variant: 'button_primary', color: 'primary', children: _socialMediaLinkText }), showSocialMediaIcon && (jsx(SocialMediaIcon, { className: 'wallet-no-access__social-icon', style: {
127
+ return (jsxs("div", { className: 'wallet-no-access__container', children: [showNoInTheListImage && (jsx("img", { src: notInTheListImageUrl, alt: t('dyn_no_access.not_in_the_list_image_alt'), className: 'wallet-no-access__image', copykey: 'dyn_no_access.not_in_the_list_image_alt' })), jsxs("div", { className: 'wallet-no-access__main', children: [jsxs("div", { className: 'wallet-no-access__user-info-container', children: [Icon, jsxs("div", { "data-testid": 'walletAddress', className: 'wallet-no-access__wallet-address-container', children: [walletConnector && (jsx(StatusDot, { variant: 'red', containerClassName: 'user-info__status-dot' })), jsx(Typography, { variant: 'body_normal', color: 'primary', weight: 'medium', className: 'wallet-no-access__wallet-address', children: correctDisplay })] })] }), jsxs("div", { className: 'wallet-no-access__content', children: [jsx(Typography, { variant: 'title', color: 'primary', className: 'wallet-no-access__content--primary', children: title }), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'wallet-no-access__content--secondary', children: subtitle })] }), jsx(TypographyButton, { onClick: buttonAction, className: 'wallet-no-access__button--primary', expanded: true, buttonPadding: 'large', children: buttonTitle }), _socialMediaUrl && _socialMediaLinkText && (jsxs("div", { className: 'wallet-no-access__social-info-container', children: [jsxs("a", { href: _socialMediaUrl, className: 'wallet-no-access__waitlist-link', children: [jsx(Typography, { variant: 'button_primary', color: 'primary', children: _socialMediaLinkText }), showSocialMediaIcon && (jsx(SocialMediaIcon, { className: 'wallet-no-access__social-icon', style: {
126
128
  height: pixelToRem(24),
127
129
  width: pixelToRem(24),
128
130
  } }))] }), typeof socialMediaIconUrl === 'string' && (jsx("img", { alt: 'social media', src: socialMediaIconUrl, style: {