refactor: client service

This commit is contained in:
codytseng
2025-08-04 22:53:36 +08:00
parent 5afbdd0aa4
commit 21f09426cf
8 changed files with 459 additions and 491 deletions

View File

@@ -222,7 +222,7 @@ export function getEmbeddedPubkeys(event: Event) {
return embeddedPubkeys
}
export function getLatestEvent(events: Event[]) {
export function getLatestEvent(events: Event[]): Event | undefined {
return events.sort((a, b) => b.created_at - a.created_at)[0]
}