Make sender_address field of Subscription object nullable
This commit is contained in:
parent
04ff50605f
commit
29b2426f92
2 changed files with 5 additions and 3 deletions
|
@ -231,7 +231,7 @@ export async function cancelSubscription(
|
||||||
export interface Subscription {
|
export interface Subscription {
|
||||||
id: number,
|
id: number,
|
||||||
sender: Profile,
|
sender: Profile,
|
||||||
sender_address: string,
|
sender_address: string | null,
|
||||||
expires_at: string,
|
expires_at: string,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -250,8 +250,10 @@ function isSubscriptionActive(subscription: Subscription): boolean {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubscriberSelected(subscription: Subscription) {
|
function onSubscriberSelected(subscription: Subscription) {
|
||||||
subscriberAddress = subscription.sender_address
|
if (subscription.sender_address !== null) {
|
||||||
subscriptionState = null
|
subscriberAddress = subscription.sender_address
|
||||||
|
subscriptionState = null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onCheckSubsciptionState() {
|
async function onCheckSubsciptionState() {
|
||||||
|
|
Loading…
Reference in a new issue