From 9df8cee501a7e205053b3e2d764b5313535873a4 Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Sat, 20 Jun 2026 14:55:06 +0000 Subject: [PATCH] Migrate to new @welshman/domain + instance-based @welshman/app API Adopts the rewritten welshman API: the removed @welshman/util helpers (Profile/List/Room/Handler/Encryptable) are now Reader/Builder classes in @welshman/domain, and @welshman/app dropped its global singletons for an App instance + app.use(Plugin) registry. - src/app/welshman.ts is now the app bootstrap + session-state module (one shared App instance, multi-account sessions/login, app-wide reactive views) rather than a compat shim re-exporting the old globals. - Rewrote ~100 callers to use app.use(Plugin) directly (thunks, profiles, relays, rooms, zaps, tags, wot, feeds, sync); thunk helpers are now thunk methods. - Added @welshman/domain dependency. - Resolved residual gaps (storage hydration via plugin.onItem/wrapManager/Plaintext, relay-list mutators, search-relay list, outbox #d filter). Best-effort: no toolchain/linking available, so this is not build- or type-checked. Remaining judgment calls are flagged with TODO(welshman-migration). Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01BsMjvv7krpZeHK1Njeneru --- package.json | 1 + src/app/call/voice.ts | 2 +- src/app/chats.ts | 5 +- src/app/comments.ts | 7 +- src/app/components/AppContainer.svelte | 2 +- .../components/CalendarEventActions.svelte | 2 +- src/app/components/CalendarEventForm.svelte | 7 +- src/app/components/Chat.svelte | 22 +- src/app/components/ChatComposeParent.svelte | 5 +- src/app/components/ChatEnable.svelte | 14 +- src/app/components/ChatItem.svelte | 5 +- src/app/components/ChatMessage.svelte | 11 +- .../components/ChatMessageEmojiButton.svelte | 5 +- .../components/ChatMessageMenuMobile.svelte | 5 +- src/app/components/ChatStart.svelte | 5 +- src/app/components/ClassifiedActions.svelte | 2 +- src/app/components/ClassifiedForm.svelte | 7 +- .../components/ContentLinkBlockImage.svelte | 2 +- src/app/components/ContentMention.svelte | 5 +- src/app/components/CurrencyInput.svelte | 2 +- src/app/components/EventActivity.svelte | 2 +- src/app/components/EventInfo.svelte | 2 +- src/app/components/EventMenu.svelte | 5 +- src/app/components/GoalCreate.svelte | 7 +- src/app/components/GoalSummary.svelte | 22 +- src/app/components/IconPicker.svelte | 2 +- src/app/components/InfoKeys.svelte | 2 +- src/app/components/InfoZapperError.svelte | 5 +- src/app/components/KeyRecoveryConfirm.svelte | 10 +- src/app/components/KeyRecoveryRequest.svelte | 9 +- src/app/components/LogIn.svelte | 10 +- src/app/components/LogInBunker.svelte | 2 +- src/app/components/LogInKey.svelte | 4 +- src/app/components/MenuSettings.svelte | 2 +- .../components/NoteContentMinimalGoal.svelte | 21 +- src/app/components/PasswordReset.svelte | 2 +- .../components/PasswordResetConfirm.svelte | 9 +- src/app/components/PollCreate.svelte | 7 +- src/app/components/PollVotes.svelte | 12 +- src/app/components/PomadeSessions.svelte | 2 +- src/app/components/PrimaryNav.svelte | 10 +- src/app/components/PrimaryNavItemSpace.svelte | 5 +- src/app/components/Profile.svelte | 11 +- src/app/components/ProfileBadges.svelte | 5 +- src/app/components/ProfileCircle.svelte | 7 +- src/app/components/ProfileCircles.svelte | 7 +- src/app/components/ProfileDelete.svelte | 24 +- src/app/components/ProfileDetail.svelte | 16 +- src/app/components/ProfileEdit.svelte | 21 +- src/app/components/ProfileFeed.svelte | 5 +- src/app/components/ProfileInfo.svelte | 7 +- src/app/components/ProfileMultiSelect.svelte | 2 +- src/app/components/ProfileName.svelte | 5 +- src/app/components/ReactionSummary.svelte | 13 +- src/app/components/RelayAdd.svelte | 4 +- src/app/components/RelayDescription.svelte | 5 +- src/app/components/RelayIcon.svelte | 5 +- src/app/components/RelayItem.svelte | 7 +- src/app/components/RelayList.svelte | 3 +- src/app/components/RelayName.svelte | 5 +- src/app/components/ReportDetails.svelte | 2 +- src/app/components/ReportMenu.svelte | 11 +- src/app/components/RoomComposeParent.svelte | 5 +- src/app/components/RoomDetail.svelte | 20 +- src/app/components/RoomForm.svelte | 64 +++- src/app/components/RoomItem.svelte | 15 +- src/app/components/RoomItemMenu.svelte | 5 +- src/app/components/RoomItemMenuMobile.svelte | 2 +- src/app/components/RoomJoinItem.svelte | 13 +- src/app/components/RoomMembers.svelte | 6 +- src/app/components/RoomMembersAdd.svelte | 12 +- src/app/components/SignUp.svelte | 18 +- src/app/components/SignerStatus.svelte | 2 +- src/app/components/SpaceDetail.svelte | 5 +- src/app/components/SpaceEdit.svelte | 11 +- src/app/components/SpaceMembers.svelte | 11 +- src/app/components/SpaceMembersBanned.svelte | 5 +- src/app/components/SpaceMenu.svelte | 5 +- src/app/components/SpaceRelayStatus.svelte | 5 +- src/app/components/SpaceSearch.svelte | 2 +- src/app/components/ThreadCreate.svelte | 7 +- src/app/components/ThreadPost.svelte | 11 +- src/app/components/ThunkFailure.svelte | 9 +- src/app/components/ThunkPending.svelte | 5 +- src/app/components/ThunkStatus.svelte | 5 +- src/app/components/ThunkStatusDetail.svelte | 5 +- .../components/ThunkStatusOrDeleted.svelte | 7 +- src/app/components/ThunkToast.svelte | 5 +- src/app/components/TopicMultiSelect.svelte | 2 +- src/app/components/VideoCallContent.svelte | 7 +- src/app/components/VoiceRoomItem.svelte | 7 +- .../WalletAsReceivingAddress.svelte | 11 +- src/app/components/WalletConnect.svelte | 4 +- src/app/components/WalletDisconnect.svelte | 2 +- .../WalletUpdateReceivingAddress.svelte | 24 +- src/app/components/WotScore.svelte | 8 +- src/app/components/Zap.svelte | 5 +- src/app/components/ZapButton.svelte | 5 +- src/app/components/ZapInvoice.svelte | 5 +- src/app/deletes.ts | 7 +- src/app/editor/MentionNodeView.ts | 5 +- src/app/editor/ProfileSuggestion.svelte | 11 +- src/app/editor/index.ts | 59 ++-- src/app/feeds.ts | 30 +- src/app/groups.ts | 226 ++++++++---- src/app/healthChecks.ts | 74 +++- src/app/lightning.ts | 2 +- src/app/members.ts | 18 +- src/app/notifications.ts | 2 +- src/app/policies.ts | 16 +- src/app/polls.ts | 5 +- src/app/pomade.ts | 2 +- src/app/profiles.ts | 28 +- src/app/push/adapters/android.ts | 4 +- src/app/push/adapters/capacitor.ts | 21 +- src/app/push/adapters/common.ts | 7 +- src/app/push/adapters/web.ts | 2 +- src/app/reactions.ts | 7 +- src/app/relays.ts | 26 +- src/app/reports.ts | 5 +- src/app/repository.ts | 5 +- src/app/rooms.ts | 167 ++++++--- src/app/routes.ts | 8 +- src/app/settings.ts | 24 +- src/app/social.ts | 13 +- src/app/storage.ts | 84 +++-- src/app/sync.ts | 49 ++- src/app/title.ts | 2 +- src/app/uploads.ts | 8 +- src/app/welshman.ts | 322 ++++++++++++++++++ src/routes/+layout.svelte | 7 +- src/routes/chat/+layout.svelte | 2 +- src/routes/chat/[chat]/+page.svelte | 2 +- src/routes/people/+page.svelte | 2 +- src/routes/settings/about/+page.svelte | 2 +- src/routes/settings/content/+page.svelte | 18 +- src/routes/settings/profile/+page.svelte | 23 +- src/routes/settings/relays/+page.svelte | 47 +-- src/routes/settings/wallet/+page.svelte | 2 +- src/routes/spaces/+page.svelte | 5 +- src/routes/spaces/[relay]/+layout.svelte | 2 +- src/routes/spaces/[relay]/[h]/+page.svelte | 11 +- .../[relay]/calendar/[address]/+page.svelte | 2 +- src/routes/spaces/[relay]/chat/+page.svelte | 5 +- .../classifieds/[address]/+page.svelte | 2 +- .../spaces/[relay]/goals/[id]/+page.svelte | 2 +- .../spaces/[relay]/polls/[id]/+page.svelte | 2 +- src/routes/spaces/[relay]/recent/+page.svelte | 2 +- .../spaces/[relay]/threads/[id]/+page.svelte | 2 +- 149 files changed, 1445 insertions(+), 707 deletions(-) create mode 100644 src/app/welshman.ts diff --git a/package.json b/package.json index 2e2fcacb..6ea9e97a 100644 --- a/package.json +++ b/package.json @@ -74,6 +74,7 @@ "@vite-pwa/sveltekit": "^1.1.0", "@welshman/app": "^0.8.16", "@welshman/content": "^0.8.16", + "@welshman/domain": "^0.8.16", "@welshman/editor": "^0.8.16", "@welshman/feeds": "^0.8.16", "@welshman/lib": "^0.8.16", diff --git a/src/app/call/voice.ts b/src/app/call/voice.ts index 57796c45..82a85efc 100644 --- a/src/app/call/voice.ts +++ b/src/app/call/voice.ts @@ -18,7 +18,7 @@ import {derived, get} from "svelte/store" import {map, not, nthEq, reject, removeUndefined, uniqBy} from "@welshman/lib" import type {TrustedEvent} from "@welshman/util" import {makeHttpAuth, makeHttpAuthHeader, getTags} from "@welshman/util" -import {signer} from "@welshman/app" +import {signer} from "@app/welshman" import {load} from "@welshman/net" import {getLivekitEndpoint} from "$lib/livekit" import {AbortError, TimeoutError, whenAborted, whenTimeout} from "$lib/util" diff --git a/src/app/chats.ts b/src/app/chats.ts index bdb088cd..e61c3f0c 100644 --- a/src/app/chats.ts +++ b/src/app/chats.ts @@ -2,7 +2,8 @@ import {DELETE, PROFILE, getPubkeyTagValues} from "@welshman/util" import type {TrustedEvent} from "@welshman/util" import {append, call, on, reject, remove, sort, sortBy, spec, uniq, uniqBy} from "@welshman/lib" import type {Override} from "@welshman/lib" -import {createSearch, displayProfileByPubkey, pubkey, repository} from "@welshman/app" +import {Profiles} from "@welshman/app" +import {app, createSearch, pubkey, repository} from "@app/welshman" import {derived, readable} from "svelte/store" import {DM_KINDS} from "@app/content" import type {RepositoryUpdate} from "@welshman/net" @@ -35,6 +36,8 @@ export const chatsById = call(() => { const chatsByPubkey = new Map() const addSearchText = (chat: Override) => { + const displayProfileByPubkey = (pk: string) => app.use(Profiles).display(pk).get() + chat.search_text = chat.pubkeys.length === 1 ? displayProfileByPubkey(chat.pubkeys[0]) + " note to self" diff --git a/src/app/comments.ts b/src/app/comments.ts index b74fa5b1..102bd1d7 100644 --- a/src/app/comments.ts +++ b/src/app/comments.ts @@ -1,6 +1,7 @@ import type {TrustedEvent} from "@welshman/util" import {COMMENT, makeEvent} from "@welshman/util" -import {publishThunk, tagEventForComment} from "@welshman/app" +import {Thunks, Tags} from "@welshman/app" +import {app} from "@app/welshman" export type CommentParams = { event: TrustedEvent @@ -10,7 +11,7 @@ export type CommentParams = { } export const makeComment = ({url, event, content, tags = []}: CommentParams) => - makeEvent(COMMENT, {content, tags: [...tags, ...tagEventForComment(event, url)]}) + makeEvent(COMMENT, {content, tags: [...tags, ...app.use(Tags).tagEventForComment(event, url)]}) export const publishComment = ({relays, ...params}: CommentParams & {relays: string[]}) => - publishThunk({event: makeComment({url: relays[0], ...params}), relays}) + app.use(Thunks).publish({event: makeComment({url: relays[0], ...params}), relays}) diff --git a/src/app/components/AppContainer.svelte b/src/app/components/AppContainer.svelte index 6b2992cd..1325abca 100644 --- a/src/app/components/AppContainer.svelte +++ b/src/app/components/AppContainer.svelte @@ -1,6 +1,6 @@ diff --git a/src/app/components/ChatMessage.svelte b/src/app/components/ChatMessage.svelte index 2293deb9..49ac7e07 100644 --- a/src/app/components/ChatMessage.svelte +++ b/src/app/components/ChatMessage.svelte @@ -2,7 +2,8 @@ import {type Instance} from "tippy.js" import {hash, formatTimestampAsTime} from "@welshman/lib" import type {TrustedEvent, EventContent} from "@welshman/util" - import {thunks, mergeThunks, pubkey, deriveProfileDisplay, sendWrapped} from "@welshman/app" + import {app, thunks, pubkey} from "@app/welshman" + import {Thunks, Profiles, Wraps} from "@welshman/app" import {isMobile} from "@lib/html" import MenuDots from "@assets/icons/menu-dots.svg?dataurl" import Icon from "@lib/components/Icon.svelte" @@ -33,18 +34,18 @@ const {event, replyTo, canEdit, onEdit, pubkeys, showPubkey = false}: Props = $props() const isOwn = event.pubkey === $pubkey - const profileDisplay = deriveProfileDisplay(event.pubkey) - const thunk = mergeThunks($thunks.filter(t => t.event.id === event.id)) + const profileDisplay = app.use(Profiles).display(event.pubkey).$ + const thunk = app.use(Thunks).merge($thunks.filter(t => t.event.id === event.id)) const [_, colorValue] = colors[hash(event.pubkey) % colors.length] const reply = () => replyTo(event) const edit = canEdit?.(event) ? () => onEdit?.(event) : undefined const deleteReaction = (event: TrustedEvent) => - sendWrapped({event: makeDelete({event, protect: false}), recipients: pubkeys, pow: 16}) + app.use(Wraps).publish({event: makeDelete({event, protect: false}), recipients: pubkeys, pow: 16}) const createReaction = (template: EventContent) => - sendWrapped({ + app.use(Wraps).publish({ event: makeReaction({event, protect: false, ...template}), recipients: pubkeys, pow: 16, diff --git a/src/app/components/ChatMessageEmojiButton.svelte b/src/app/components/ChatMessageEmojiButton.svelte index 9488a0d2..acff8ad0 100644 --- a/src/app/components/ChatMessageEmojiButton.svelte +++ b/src/app/components/ChatMessageEmojiButton.svelte @@ -1,7 +1,8 @@ diff --git a/src/app/components/CurrencyInput.svelte b/src/app/components/CurrencyInput.svelte index 646441ed..35bf27f3 100644 --- a/src/app/components/CurrencyInput.svelte +++ b/src/app/components/CurrencyInput.svelte @@ -4,7 +4,7 @@ import type {Writable} from "svelte/store" import type {Instance} from "tippy.js" import {preventDefault} from "@lib/html" - import {createSearch} from "@welshman/app" + import {createSearch} from "@app/welshman" import {currencyOptions, displayCurrency} from "@lib/currency" import Suggestions from "@lib/components/Suggestions.svelte" import CurrencySuggestion from "@app/components/CurrencySuggestion.svelte" diff --git a/src/app/components/EventActivity.svelte b/src/app/components/EventActivity.svelte index 3f2dac4d..08296f7e 100644 --- a/src/app/components/EventActivity.svelte +++ b/src/app/components/EventActivity.svelte @@ -5,7 +5,7 @@ import {load} from "@welshman/net" import {deriveArray, deriveEventsById} from "@welshman/store" import type {TrustedEvent} from "@welshman/util" - import {repository} from "@welshman/app" + import {repository} from "@app/welshman" import {deriveChecked} from "@app/notifications" import Reply from "@assets/icons/reply-2.svg?dataurl" import Icon from "@lib/components/Icon.svelte" diff --git a/src/app/components/EventInfo.svelte b/src/app/components/EventInfo.svelte index 212577d6..51e82d67 100644 --- a/src/app/components/EventInfo.svelte +++ b/src/app/components/EventInfo.svelte @@ -4,7 +4,7 @@ import {LOCALE, secondsToDate} from "@welshman/lib" import type {TrustedEvent} from "@welshman/util" import {displayRelayUrl} from "@welshman/util" - import {tracker} from "@welshman/app" + import {tracker} from "@app/welshman" import FileText from "@assets/icons/file-text.svg?dataurl" import Copy from "@assets/icons/copy.svg?dataurl" import UserCircle from "@assets/icons/user-circle.svg?dataurl" diff --git a/src/app/components/EventMenu.svelte b/src/app/components/EventMenu.svelte index 3486f299..9014b0c2 100644 --- a/src/app/components/EventMenu.svelte +++ b/src/app/components/EventMenu.svelte @@ -4,7 +4,8 @@ import {goto} from "$app/navigation" import type {TrustedEvent} from "@welshman/util" import {COMMENT, ManagementMethod} from "@welshman/util" - import {pubkey, repository, relaysByUrl, manageRelay} from "@welshman/app" + import {app, pubkey, repository, relaysByUrl} from "@app/welshman" + import {RelayManagement} from "@welshman/app" import ShareCircle from "@assets/icons/share-circle.svg?dataurl" import Code2 from "@assets/icons/code-2.svg?dataurl" import TrashBin2 from "@assets/icons/trash-bin-2.svg?dataurl" @@ -56,7 +57,7 @@ title: `Delete ${noun}`, message: `Are you sure you want to delete this ${noun.toLowerCase()} from the space?`, confirm: async () => { - const {error} = await manageRelay(url, { + const {error} = await app.use(RelayManagement).post(url, { method: ManagementMethod.BanEvent, params: [event.id], }) diff --git a/src/app/components/GoalCreate.svelte b/src/app/components/GoalCreate.svelte index 91c1264b..adbd07f4 100644 --- a/src/app/components/GoalCreate.svelte +++ b/src/app/components/GoalCreate.svelte @@ -1,7 +1,8 @@ diff --git a/src/app/components/KeyRecoveryConfirm.svelte b/src/app/components/KeyRecoveryConfirm.svelte index 5b98d555..332230ac 100644 --- a/src/app/components/KeyRecoveryConfirm.svelte +++ b/src/app/components/KeyRecoveryConfirm.svelte @@ -1,8 +1,14 @@ diff --git a/src/app/components/PomadeSessions.svelte b/src/app/components/PomadeSessions.svelte index 76b162dc..28a32d9d 100644 --- a/src/app/components/PomadeSessions.svelte +++ b/src/app/components/PomadeSessions.svelte @@ -1,7 +1,7 @@ import * as nip19 from "nostr-tools/nip19" import {removeUndefined} from "@welshman/lib" - import {displayPubkey} from "@welshman/util" - import {deriveHandleForPubkey, displayHandle, deriveProfileDisplay} from "@welshman/app" + import {displayPubkey, displayNip05} from "@welshman/util" + import {Handles, Profiles} from "@welshman/app" + import {app} from "@app/welshman" import Icon from "@lib/components/Icon.svelte" import Button from "@lib/components/Button.svelte" import ProfileCircle from "@app/components/ProfileCircle.svelte" @@ -23,8 +24,8 @@ const {pubkey, url, showPubkey, inert, avatarSize = 10}: Props = $props() const relays = removeUndefined([url]) - const profileDisplay = deriveProfileDisplay(pubkey, relays) - const handle = deriveHandleForPubkey(pubkey) + const profileDisplay = app.use(Profiles).display(pubkey, relays).$ + const handle = app.use(Handles).forPubkey(pubkey).$ const openProfile = () => { pushModal(ProfileDetail, {pubkey, url}) @@ -58,7 +59,7 @@ {#if $handle}
- {displayHandle($handle)} + {displayNip05($handle?.nip05)}
{/if} {#if showPubkey} diff --git a/src/app/components/ProfileBadges.svelte b/src/app/components/ProfileBadges.svelte index ca89f00f..85b76c43 100644 --- a/src/app/components/ProfileBadges.svelte +++ b/src/app/components/ProfileBadges.svelte @@ -6,7 +6,8 @@ import {deriveEventsDesc, deriveEventsById} from "@welshman/store" import {formatTimestampRelative} from "@welshman/lib" import {NOTE, ROOMS, COMMENT, MESSAGE} from "@welshman/util" - import {repository, loadRelayList} from "@welshman/app" + import {RelayLists} from "@welshman/app" + import {repository, app} from "@app/welshman" import Button from "@lib/components/Button.svelte" import ProfileSpaces from "@app/components/ProfileSpaces.svelte" import {deriveGroupList, getSpaceUrlsFromGroupList} from "@app/groups" @@ -30,7 +31,7 @@ onMount(async () => { // Make sure we have their relay selections before we load their posts - await loadRelayList(pubkey) + await app.use(RelayLists).load(pubkey) // Load groups and at least one note, regardless of time frame load({ diff --git a/src/app/components/ProfileCircle.svelte b/src/app/components/ProfileCircle.svelte index 49f769b2..bed2b1c0 100644 --- a/src/app/components/ProfileCircle.svelte +++ b/src/app/components/ProfileCircle.svelte @@ -1,7 +1,8 @@ + src={$profile?.picture() || UserRounded} /> diff --git a/src/app/components/ProfileCircles.svelte b/src/app/components/ProfileCircles.svelte index 8d161157..15f688d1 100644 --- a/src/app/components/ProfileCircles.svelte +++ b/src/app/components/ProfileCircles.svelte @@ -1,6 +1,7 @@ diff --git a/src/app/components/ProfileEdit.svelte b/src/app/components/ProfileEdit.svelte index 6cb41493..d2309ac6 100644 --- a/src/app/components/ProfileEdit.svelte +++ b/src/app/components/ProfileEdit.svelte @@ -1,7 +1,6 @@ {#if $profile} - + {/if} diff --git a/src/app/components/ProfileMultiSelect.svelte b/src/app/components/ProfileMultiSelect.svelte index e0b51151..ea39ef17 100644 --- a/src/app/components/ProfileMultiSelect.svelte +++ b/src/app/components/ProfileMultiSelect.svelte @@ -4,7 +4,7 @@ import type {Writable} from "svelte/store" import {type Instance} from "tippy.js" import {append, remove, uniq} from "@welshman/lib" - import {profileSearch} from "@welshman/app" + import {profileSearch} from "@app/welshman" import Suggestions from "@lib/components/Suggestions.svelte" import CloseCircle from "@assets/icons/close-circle.svg?dataurl" import Magnifier from "@assets/icons/magnifier.svg?dataurl" diff --git a/src/app/components/ProfileName.svelte b/src/app/components/ProfileName.svelte index 075c779a..4ec05bbf 100644 --- a/src/app/components/ProfileName.svelte +++ b/src/app/components/ProfileName.svelte @@ -1,6 +1,7 @@ {$profileDisplay} diff --git a/src/app/components/ReactionSummary.svelte b/src/app/components/ReactionSummary.svelte index 96a9749d..ab146e73 100644 --- a/src/app/components/ReactionSummary.svelte +++ b/src/app/components/ReactionSummary.svelte @@ -17,7 +17,8 @@ import type {TrustedEvent, EventContent, Zap} from "@welshman/util" import {deriveArray, deriveEventsById, deriveItemsByKey} from "@welshman/store" import {load} from "@welshman/net" - import {pubkey, repository, getValidZap, displayProfileByPubkey} from "@welshman/app" + import {Zappers, Profiles} from "@welshman/app" + import {pubkey, repository, app} from "@app/welshman" import {isMobile, preventDefault, stopPropagation} from "@lib/html" import Danger from "@assets/icons/danger-triangle.svg?dataurl" import Icon from "@lib/components/Icon.svelte" @@ -64,15 +65,15 @@ repository, getKey: zap => zap.response.id, filters: [{kinds: [ZAP_RESPONSE], "#e": eventIds}], - eventToItem: (response: TrustedEvent) => { - const zap = getValidZap(response, event) + eventToItem: async (response: TrustedEvent) => { + const zap = await app.use(Zappers).validateZapReceipt(response, event) if (zap) { return zap } if (innerEvent) { - return getValidZap(response, innerEvent) + return await app.use(Zappers).validateZapReceipt(response, innerEvent) } }, }), @@ -150,7 +151,7 @@ {@const amount = fromMsats(sum(zaps.map(zap => zap.invoiceAmount)))} {@const pubkeys = uniq(zaps.map(zap => zap.request.pubkey))} {@const isOwn = $pubkey && pubkeys.includes($pubkey)} - {@const info = displayList(pubkeys.map(pubkey => displayProfileByPubkey(pubkey)))} + {@const info = displayList(pubkeys.map(pubkey => app.use(Profiles).display(pubkey).get()))} {@const tooltip = `${info} zapped`} - {#key $profile?.about} - + {#key $profile?.about()} + {/key}
@@ -114,7 +115,7 @@ {#snippet input()} {/snippet} @@ -155,7 +156,7 @@ {#snippet input()}