diff --git a/apps/dashboard/src/app/nebula-app/(app)/components/ChatBar.tsx b/apps/dashboard/src/app/nebula-app/(app)/components/ChatBar.tsx index 6f0a751c59c..9d6eb98f700 100644 --- a/apps/dashboard/src/app/nebula-app/(app)/components/ChatBar.tsx +++ b/apps/dashboard/src/app/nebula-app/(app)/components/ChatBar.tsx @@ -93,6 +93,33 @@ export function ChatBar(props: {
{props.showContextSelector && (
+ {props.connectedWallets.length > 1 && + !props.isConnectingWallet && ( + { + props.setActiveWallet(walletMeta); + props.setContext({ + walletAddress: walletMeta.address, + chainIds: props.context?.chainIds || [], + networks: props.context?.networks || null, + }); + }} + /> + )} + + {props.isConnectingWallet && ( + + + Connecting Wallet + + )} + - - {props.connectedWallets.length > 1 && - !props.isConnectingWallet && ( - { - props.setActiveWallet(walletMeta); - props.setContext({ - walletAddress: walletMeta.address, - chainIds: props.context?.chainIds || [], - networks: props.context?.networks || null, - }); - }} - /> - )} - - {props.isConnectingWallet && ( - - - Connecting Wallet - - )}
)}
@@ -251,6 +251,13 @@ function WalletSelector(props: { return null; } + // show smart account first + const sortedWallets = props.wallets.sort((a, b) => { + if (a.walletId === "smart") return -1; + if (b.walletId === "smart") return 1; + return 0; + }); + return ( @@ -289,7 +296,7 @@ function WalletSelector(props: {
- {props.wallets.map((wallet) => ( + {sortedWallets.map((wallet) => ( // biome-ignore lint/a11y/useKeyWithClickEvents:
((props, ref) => { - const { txChainId, isLoggedIn, ...buttonProps } = props; + const { txChainId, isLoggedIn, isPending, ...buttonProps } = props; const account = useActiveAccount(); const wallet = useActiveWallet(); const activeWalletChain = useActiveWalletChain(); @@ -161,7 +161,7 @@ export const MismatchButton = forwardRef< // if user is about to trigger a transaction on txChain, but txChainBalance is not yet loaded and is required before proceeding (!showSwitchChainPopover && txChainBalance.isPending && isBalanceRequired); - const showSpinner = props.isPending || switchNetworkMutation.isPending; + const showSpinner = isPending || switchNetworkMutation.isPending; return ( <>