File tree Expand file tree Collapse file tree
main/components/account-switch-float-modal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,6 +66,8 @@ import {
6666 WalletDeletePage ,
6767 WalletSelectPage ,
6868 WalletShowSensitivePage ,
69+ SmartAccountPage ,
70+ SmartAccountConfirmPage ,
6971} from "./pages/wallet" ;
7072import { SuggestChainPage } from "./pages/suggest-chain" ;
7173import { ModalRootProvider } from "./components/modal" ;
@@ -549,6 +551,14 @@ const RoutesAfterReady: FunctionComponent = observer(() => {
549551 path = "/wallet/show-sensitive"
550552 element = { < WalletShowSensitivePage /> }
551553 />
554+ < Route
555+ path = "/wallet/smart-account"
556+ element = { < SmartAccountPage /> }
557+ />
558+ < Route
559+ path = "/wallet/smart-account/confirm"
560+ element = { < SmartAccountConfirmPage /> }
561+ />
552562 < Route path = "/suggest-chain" element = { < SuggestChainPage /> } />
553563 < Route path = "/ibc-transfer" element = { < IBCTransferPage /> } />
554564 < Route
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import { useGetIcnsName } from "../../../../hooks/use-get-icns-name";
2424import { ContextMenuStyles } from "../../../../components/context-menu" ;
2525import { AccountNameIcon } from "../account-icon" ;
2626import { PortalTooltip } from "../../../../components/tooltip/portal" ;
27+ import { useEip7702Chains } from "../../../wallet/smart-account/hooks/use-eip7702-chains" ;
2728
2829const Styles = {
2930 AccountItem : styled . div < { isSelected : boolean } > `
@@ -145,6 +146,7 @@ export const AccountItemSwitchModal = observer(
145146
146147 const icnsPrimaryName = useGetIcnsName ( bech32Address ) ;
147148 const paragraph = useGetKeyInfoParagraph ( keyInfo , true ) ;
149+ const eip7702Chains = useEip7702Chains ( ) ;
148150 const dropdownItems = ( ( ) => {
149151 const defaults = [
150152 {
@@ -186,6 +188,20 @@ export const AccountItemSwitchModal = observer(
186188 }
187189 }
188190
191+ // Smart Account menu — only for software wallets with at least one EIP-7702 chain
192+ if (
193+ ( keyInfo . type === "mnemonic" || keyInfo . type === "private-key" ) &&
194+ eip7702Chains . length > 0
195+ ) {
196+ defaults . splice ( defaults . length - 1 , 0 , {
197+ key : "smart-account" ,
198+ label : intl . formatMessage ( {
199+ id : "page.wallet.keyring-item.dropdown.smart-account-title" ,
200+ } ) ,
201+ onSelect : ( ) => navigate ( `/wallet/smart-account?id=${ keyInfo . id } ` ) ,
202+ } ) ;
203+ }
204+
189205 return defaults ;
190206 } ) ( ) ;
191207
Original file line number Diff line number Diff line change @@ -2,3 +2,4 @@ export * from "./select";
22export * from "./delete" ;
33export * from "./change-name" ;
44export * from "./show-sensitive" ;
5+ export { SmartAccountPage , SmartAccountConfirmPage } from "./smart-account" ;
You can’t perform that action at this time.
0 commit comments