diff --git a/src/lib/components/drip-list-badge/drip-list-badge.svelte b/src/lib/components/drip-list-badge/drip-list-badge.svelte index 3d9fa3d08..46c9d880f 100644 --- a/src/lib/components/drip-list-badge/drip-list-badge.svelte +++ b/src/lib/components/drip-list-badge/drip-list-badge.svelte @@ -3,53 +3,53 @@ import ensStore from '$lib/stores/ens'; import formatAddress from '$lib/utils/format-address'; - export let listName: string; export let listId: string; - export let owner: string; + export let listName: string | null | undefined = undefined; + export let owner: string | undefined = undefined; - export let showAvatar = true; - export let showName = true; export let isLinked = true; + export let showAvatar = true; + export let avatarSize: 'small' | 'default' = 'default'; + export let listLoading = false; - $: ensStore.connected && ensStore.lookup(owner); - $: ens = $ensStore[owner]; - - $: username = ens?.name ? ens.name : formatAddress(owner); + // lookup ens name if owner is provided + $: owner && ensStore.connected && ensStore.lookup(owner); + $: ens = owner ? $ensStore[owner] : {}; + $: username = ens?.name || (owner && formatAddress(owner)); {#if showAvatar} -
- +
+
{/if} - {#if showName} + {#if listName !== undefined}
- {username}/{listName} + {#if username}{username}/{/if}{#if listLoading}...{:else if listName === null}Unknown list{:else}{listName}{/if}
{/if} diff --git a/src/routes/app/(app)/[accountId]/tokens/[token]/streams/[dripId]/+page.svelte b/src/routes/app/(app)/[accountId]/tokens/[token]/streams/[dripId]/+page.svelte index 60270962e..2130d4df7 100644 --- a/src/routes/app/(app)/[accountId]/tokens/[token]/streams/[dripId]/+page.svelte +++ b/src/routes/app/(app)/[accountId]/tokens/[token]/streams/[dripId]/+page.svelte @@ -73,7 +73,7 @@ if (stream) { streamName = stream.receiver.driver === 'nft' - ? 'Drip List Support Stream' + ? 'Drip List support stream' : stream.name ?? 'Unnamed stream'; } } diff --git a/src/routes/app/(app)/streams/sections/streams.section.svelte b/src/routes/app/(app)/streams/sections/streams.section.svelte index 3bc7e412b..7edbe41c1 100644 --- a/src/routes/app/(app)/streams/sections/streams.section.svelte +++ b/src/routes/app/(app)/streams/sections/streams.section.svelte @@ -92,7 +92,7 @@ // TODO: Donʼt presume that any stream to an NFT subaccount is going to a Drip List. const streamName = stream.receiver.driver === 'nft' - ? 'Drip List Support Stream' + ? 'Drip List support stream' : stream.name ?? 'Unnamed stream'; return { diff --git a/src/routes/app/(flows)/funder-onboarding/funder-onboarding-flow.ts b/src/routes/app/(flows)/funder-onboarding/funder-onboarding-flow.ts index aec62e3a5..5ab2f4fb6 100644 --- a/src/routes/app/(flows)/funder-onboarding/funder-onboarding-flow.ts +++ b/src/routes/app/(flows)/funder-onboarding/funder-onboarding-flow.ts @@ -56,9 +56,6 @@ export function slotsTemplate(state: State, stepIndex: number): Slots { component: DripListBadge, props: { listId: item.list.id, - listName: item.list.name, - owner: item.list.owner, - showName: false, }, }; }