From c19443af8faf66ab9b260174c0e7e8302bfbb93e Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 4 Jan 2026 19:37:16 +0000 Subject: [PATCH] fix: replace 'any' types with proper IAccount - Updated AccountCard component to use IAccount - Updated switchAccount function to use proper type - Added ISigner import to both files - Maintains type safety while supporting all account types --- src/components/AccountManager.tsx | 4 +++- src/components/nostr/user-menu.tsx | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/AccountManager.tsx b/src/components/AccountManager.tsx index e47fe1a..4e678f9 100644 --- a/src/components/AccountManager.tsx +++ b/src/components/AccountManager.tsx @@ -9,12 +9,14 @@ import { Button } from "@/components/ui/button"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import Nip05 from "@/components/nostr/nip05"; +import type { IAccount } from "applesauce-accounts"; +import type { ISigner } from "applesauce-signers"; function AccountCard({ account, isActive, }: { - account: any; + account: IAccount; isActive: boolean; }) { const profile = useProfile(account.pubkey); diff --git a/src/components/nostr/user-menu.tsx b/src/components/nostr/user-menu.tsx index 91cff8c..09c85eb 100644 --- a/src/components/nostr/user-menu.tsx +++ b/src/components/nostr/user-menu.tsx @@ -23,6 +23,7 @@ import { RelayLink } from "./RelayLink"; import SettingsDialog from "@/components/SettingsDialog"; import { useState } from "react"; import type { IAccount } from "applesauce-accounts"; +import type { ISigner } from "applesauce-signers"; function UserAvatar({ pubkey }: { pubkey: string }) { const profile = useProfile(pubkey); @@ -85,7 +86,7 @@ export default function UserMenu() { } } - function switchAccount(targetAccount: IAccount) { + function switchAccount(targetAccount: IAccount) { accounts.setActive(targetAccount.id); }