fix: replace 'any' types with proper IAccount<ISigner, unknown, unknown>

- Updated AccountCard component to use IAccount<ISigner, unknown, unknown>
- Updated switchAccount function to use proper type
- Added ISigner import to both files
- Maintains type safety while supporting all account types
This commit is contained in:
Claude
2026-01-04 19:37:16 +00:00
parent 8a4e114d9f
commit c19443af8f
2 changed files with 5 additions and 2 deletions

View File

@@ -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<ISigner, unknown, unknown>;
isActive: boolean;
}) {
const profile = useProfile(account.pubkey);

View File

@@ -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<any, any, any>) {
function switchAccount(targetAccount: IAccount<ISigner, unknown, unknown>) {
accounts.setActive(targetAccount.id);
}