Disable subscription payment form when sender is same as recipient
This commit is contained in:
parent
2ebd2bad62
commit
65cc9c706f
2 changed files with 10 additions and 2 deletions
|
@ -234,7 +234,10 @@ async function checkSubscription() {
|
|||
}
|
||||
|
||||
function canSubscribe(): boolean {
|
||||
return subscriptionsEnabled === true
|
||||
return (
|
||||
sender.id !== recipient.id &&
|
||||
subscriptionsEnabled === true
|
||||
)
|
||||
}
|
||||
|
||||
function getPaymentAmount(): FixedNumber {
|
||||
|
|
|
@ -168,7 +168,12 @@ function isSubscribed(): boolean {
|
|||
}
|
||||
|
||||
function canSubscribe(): boolean {
|
||||
return sender.id !== "" && subscriptionPrice !== null && invoice === null
|
||||
return (
|
||||
sender.id !== "" &&
|
||||
sender.id !== recipient.id &&
|
||||
subscriptionPrice !== null &&
|
||||
invoice === null
|
||||
)
|
||||
}
|
||||
|
||||
function getPaymentAmount(): number {
|
||||
|
|
Loading…
Reference in a new issue