Track payment method

This commit is contained in:
Jon Staab
2026-05-29 12:24:39 -07:00
parent d5047dedb1
commit ae3e1c316e
8 changed files with 14 additions and 7 deletions
+1
View File
@@ -98,6 +98,7 @@ export type Tenant = {
nwc_is_set: boolean
created_at: number
stripe_customer_id: string
stripe_payment_method_id: string | null
nwc_error: string | null
stripe_error: string | null
churned_at: number | null
+1 -1
View File
@@ -135,7 +135,7 @@ export const reactivateRelayById = (id: string) => reactivateRelay(id)
export async function tenantNeedsPaymentSetup(): Promise<boolean> {
const tenant = await getTenant(account()!.pubkey)
return !tenant.nwc_is_set
return !tenant.nwc_is_set && !tenant.stripe_payment_method_id
}
export async function getLatestOpenInvoice(): Promise<Invoice | null> {
+1 -1
View File
@@ -59,7 +59,7 @@ export default function RelayDetail() {
if (!isPaidRelay()) return false
const t = tenant()
if (!t) return false
return !t.nwc_is_set
return !t.nwc_is_set && !t.stripe_payment_method_id
})
return (