1- import { ElementType , useMemo } from 'react' ;
1+ import { useMemo } from 'react' ;
22
33import { BonsaiCore } from '@/bonsai/ontology' ;
4- import { useMfaEnrollment , usePrivy } from '@privy-io/react-auth' ;
4+ // import { useMfaEnrollment } from '@privy-io/react-auth';
55import { LAMPORTS_PER_SOL } from '@solana/web3.js' ;
66import styled , { css } from 'styled-components' ;
77import tw from 'twin.macro' ;
@@ -13,21 +13,20 @@ import { STRING_KEYS } from '@/constants/localization';
1313import { isDev } from '@/constants/networks' ;
1414import { SMALL_USD_DECIMALS , USD_DECIMALS } from '@/constants/numbers' ;
1515import { StatsigFlags } from '@/constants/statsig' ;
16- import { ConnectorType , DydxChainAsset , wallets , WalletType } from '@/constants/wallets' ;
16+ import { DydxChainAsset , WalletType } from '@/constants/wallets' ;
1717
1818import { useAccountBalance } from '@/hooks/useAccountBalance' ;
1919import { useAccounts } from '@/hooks/useAccounts' ;
2020import { useBreakpoints } from '@/hooks/useBreakpoints' ;
2121import { useEnableSpot } from '@/hooks/useEnableSpot' ;
2222import { useEnvFeatures } from '@/hooks/useEnvFeatures' ;
23- import { useMobileAppUrl } from '@/hooks/useMobileAppUrl' ;
2423import { usePerpetualsComplianceState } from '@/hooks/usePerpetualsComplianceState' ;
2524import { useStatsigGateValue } from '@/hooks/useStatsig' ;
2625import { useStringGetter } from '@/hooks/useStringGetter' ;
2726import { useSubaccount } from '@/hooks/useSubaccount' ;
2827import { useTokenConfigs } from '@/hooks/useTokenConfigs' ;
2928
30- import { AppleIcon , AppleLightIcon , DiscordIcon , GoogleIcon , TwitterIcon } from '@/icons' ;
29+ // import { AppleIcon, AppleLightIcon, DiscordIcon, GoogleIcon, TwitterIcon } from '@/icons';
3130import { headerMixins } from '@/styles/headerMixins' ;
3231import { layoutMixins } from '@/styles/layoutMixins' ;
3332
@@ -88,12 +87,12 @@ export const AccountMenu = () => {
8887 } = useAccounts ( ) ;
8988 const { registerAffiliate } = useSubaccount ( ) ;
9089
91- const privy = usePrivy ( ) ;
92- const { google, discord, twitter } = privy . user ?? { } ;
90+ // const privy = usePrivy();
91+ // const { google, discord, twitter } = privy.user ?? {};
9392
94- const { showMfaEnrollmentModal } = useMfaEnrollment ( ) ;
93+ // const { showMfaEnrollmentModal } = useMfaEnrollment();
9594
96- const { appleAppStoreUrl, googlePlayStoreUrl } = useMobileAppUrl ( ) ;
95+ // const { appleAppStoreUrl, googlePlayStoreUrl } = useMobileAppUrl();
9796
9897 const usedBalanceBN = MustBigNumber ( usdcBalance ) ;
9998
@@ -120,55 +119,55 @@ export const AccountMenu = () => {
120119 return null ;
121120 }
122121
123- if (
124- onboardingState === OnboardingState . AccountConnected &&
125- walletInfo . name === WalletType . Privy
126- ) {
127- if ( google ) {
128- return < Icon iconComponent = { GoogleIcon as ElementType } /> ;
129- }
130-
131- if ( discord ) {
132- return < Icon iconComponent = { DiscordIcon as ElementType } /> ;
133- }
134-
135- if ( twitter ) {
136- return < Icon iconComponent = { TwitterIcon as ElementType } /> ;
137- }
138-
139- return (
140- < Icon
141- tw = "rounded-[0.25rem]"
142- iconComponent = { wallets [ WalletType . Privy ] . icon as ElementType }
143- />
144- ) ;
145- }
146-
147- if (
148- onboardingState === OnboardingState . AccountConnected &&
149- walletInfo . connectorType === ConnectorType . Turnkey
150- ) {
151- if ( walletInfo . providerName === 'google' ) {
152- return < Icon iconComponent = { GoogleIcon as ElementType } /> ;
153- }
154-
155- if ( walletInfo . providerName === 'apple' ) {
156- return (
157- < Icon
158- iconComponent = {
159- theme === AppTheme . Light
160- ? ( AppleIcon as ElementType )
161- : ( AppleLightIcon as ElementType )
162- }
163- />
164- ) ;
165- }
166-
167- return < Icon iconComponent = { wallets [ WalletType . Turnkey ] . icon as ElementType } /> ;
168- }
122+ // if (
123+ // onboardingState === OnboardingState.AccountConnected &&
124+ // walletInfo.name === WalletType.Privy
125+ // ) {
126+ // if (google) {
127+ // return <Icon iconComponent={GoogleIcon as ElementType} />;
128+ // }
129+
130+ // if (discord) {
131+ // return <Icon iconComponent={DiscordIcon as ElementType} />;
132+ // }
133+
134+ // if (twitter) {
135+ // return <Icon iconComponent={TwitterIcon as ElementType} />;
136+ // }
137+
138+ // return (
139+ // <Icon
140+ // tw="rounded-[0.25rem]"
141+ // iconComponent={wallets[WalletType.Privy].icon as ElementType}
142+ // />
143+ // );
144+ // }
145+
146+ // if (
147+ // onboardingState === OnboardingState.AccountConnected &&
148+ // walletInfo.connectorType === ConnectorType.Turnkey
149+ // ) {
150+ // if (walletInfo.providerName === 'google') {
151+ // return <Icon iconComponent={GoogleIcon as ElementType} />;
152+ // }
153+
154+ // if (walletInfo.providerName === 'apple') {
155+ // return (
156+ // <Icon
157+ // iconComponent={
158+ // theme === AppTheme.Light
159+ // ? (AppleIcon as ElementType)
160+ // : (AppleLightIcon as ElementType)
161+ // }
162+ // />
163+ // );
164+ // }
165+
166+ // return <Icon iconComponent={wallets[WalletType.Turnkey].icon as ElementType} />;
167+ // }
169168
170169 return < WalletIcon wallet = { walletInfo } /> ;
171- } , [ onboardingState , walletInfo , google , discord , twitter , theme ] ) ;
170+ } , [ onboardingState , walletInfo , theme ] ) ;
172171
173172 return onboardingState === OnboardingState . Disconnected ? (
174173 < OnboardingTriggerButton size = { ButtonSize . XSmall } />
@@ -398,24 +397,24 @@ export const AccountMenu = () => {
398397 } ,
399398 ]
400399 : [ ] ) ,
401- ...( ( appleAppStoreUrl ?? googlePlayStoreUrl )
402- ? [
403- {
404- value : 'MobileDownload' ,
405- icon : < Icon iconName = { IconName . Qr } /> ,
406- label : stringGetter ( { key : STRING_KEYS . DOWNLOAD_MOBILE_APP } ) ,
407- onSelect : ( ) => {
408- dispatch (
409- openDialog (
410- DialogTypes . MobileDownload ( {
411- mobileAppUrl : ( appleAppStoreUrl ?? googlePlayStoreUrl ) ! ,
412- } )
413- )
414- ) ;
415- } ,
416- } ,
417- ]
418- : [ ] ) ,
400+ // ...((appleAppStoreUrl ?? googlePlayStoreUrl)
401+ // ? [
402+ // {
403+ // value: 'MobileDownload',
404+ // icon: <Icon iconName={IconName.Qr} />,
405+ // label: stringGetter({ key: STRING_KEYS.DOWNLOAD_MOBILE_APP }),
406+ // onSelect: () => {
407+ // dispatch(
408+ // openDialog(
409+ // DialogTypes.MobileDownload({
410+ // mobileAppUrl: (appleAppStoreUrl ?? googlePlayStoreUrl)!,
411+ // })
412+ // )
413+ // );
414+ // },
415+ // },
416+ // ]
417+ // : []),
419418 onboardingState === OnboardingState . AccountConnected &&
420419 hdKey && {
421420 value : 'MobileQrSignIn' ,
@@ -432,16 +431,16 @@ export const AccountMenu = () => {
432431 highlightColor : 'destroy' as const ,
433432 onSelect : ( ) => dispatch ( openDialog ( DialogTypes . MnemonicExport ( ) ) ) ,
434433 } ,
435- ...( privy . ready && privy . authenticated
436- ? [
437- {
438- value : 'MFA' ,
439- icon : < Icon iconName = { IconName . Lock } /> ,
440- label : stringGetter ( { key : STRING_KEYS . MULTI_FACTOR_AUTH } ) ,
441- onSelect : ( ) => showMfaEnrollmentModal ( ) ,
442- } ,
443- ]
444- : [ ] ) ,
434+ // ...(privy.ready && privy.authenticated
435+ // ? [
436+ // {
437+ // value: 'MFA',
438+ // icon: <Icon iconName={IconName.Lock} />,
439+ // label: stringGetter({ key: STRING_KEYS.MULTI_FACTOR_AUTH }),
440+ // onSelect: () => showMfaEnrollmentModal(),
441+ // },
442+ // ]
443+ // : []),
445444 {
446445 value : 'Disconnect' ,
447446 icon : < Icon iconName = { IconName . BoxClose } /> ,
0 commit comments