@@ -26,6 +26,7 @@ import { calculateCanAccountTrade } from '@/state/accountCalculators';
2626import { getOnboardingState } from '@/state/accountSelectors' ;
2727import { useAppDispatch , useAppSelector } from '@/state/appTypes' ;
2828import { openDialog } from '@/state/dialogs' ;
29+ import { selectIsTurnkeyConnected } from '@/state/walletSelectors' ;
2930
3031import { isTruthy } from '@/lib/isTruthy' ;
3132import { orEmptyObj } from '@/lib/typeUtils' ;
@@ -38,6 +39,7 @@ export const UserMenuContent = () => {
3839 const onboardingState = useAppSelector ( getOnboardingState ) ;
3940 const { complianceState } = useComplianceState ( ) ;
4041 const canAccountTrade = useAppSelector ( calculateCanAccountTrade ) ;
42+ const isTurnkeyConnected = useAppSelector ( selectIsTurnkeyConnected ) ;
4143 const { equity, freeCollateral } = orEmptyObj (
4244 useAppSelector ( BonsaiCore . account . parentSubaccountSummary . data )
4345 ) ;
@@ -93,6 +95,24 @@ export const UserMenuContent = () => {
9395 dispatch ( openDialog ( DialogTypes . Help ( ) ) ) ;
9496 } ,
9597 } ,
98+ onboardingState === OnboardingState . AccountConnected &&
99+ ( isTurnkeyConnected
100+ ? {
101+ key : 'export-turnkey' ,
102+ label : stringGetter ( { key : STRING_KEYS . ACCOUNT_MANAGEMENT } ) ,
103+ icon : < Icon iconName = { IconName . User } /> ,
104+ onClick : ( ) => {
105+ dispatch ( openDialog ( DialogTypes . ManageAccount ( ) ) ) ;
106+ } ,
107+ }
108+ : {
109+ key : 'export-keys' ,
110+ label : stringGetter ( { key : STRING_KEYS . EXPORT_DYDX_WALLET } ) ,
111+ icon : < Icon iconName = { IconName . ExportKeys } /> ,
112+ onClick : ( ) => {
113+ dispatch ( openDialog ( DialogTypes . MnemonicExport ( ) ) ) ;
114+ } ,
115+ } ) ,
96116 onboardingState !== OnboardingState . Disconnected && {
97117 key : 'disconnect-wallet' ,
98118 label : stringGetter ( { key : STRING_KEYS . SIGN_OUT } ) ,
0 commit comments