diff --git a/src/api/subscriptions.ts b/src/api/subscriptions.ts index ff14dbc..3904ca8 100644 --- a/src/api/subscriptions.ts +++ b/src/api/subscriptions.ts @@ -231,7 +231,7 @@ export async function cancelSubscription( export interface Subscription { id: number, sender: Profile, - sender_address: string, + sender_address: string | null, expires_at: string, } diff --git a/src/components/SubscriptionSetup.vue b/src/components/SubscriptionSetup.vue index 9b65a80..d9d750f 100644 --- a/src/components/SubscriptionSetup.vue +++ b/src/components/SubscriptionSetup.vue @@ -250,8 +250,10 @@ function isSubscriptionActive(subscription: Subscription): boolean { } function onSubscriberSelected(subscription: Subscription) { - subscriberAddress = subscription.sender_address - subscriptionState = null + if (subscription.sender_address !== null) { + subscriberAddress = subscription.sender_address + subscriptionState = null + } } async function onCheckSubsciptionState() {