feat: replace desktop membership with permanent point wallet
This commit is contained in:
1 parent
2f82b9f79c
commit
a1cce428af
24 files changed
+1343
-1707
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import type { WorksTokenPointBalance } from './works-square';
|
||||
import type { WorksTokenPointBalance } from './works-billing';
|
||||
|
||||
const TOKEN_POINT_VALUE_PATTERN = /^(0|[1-9]\d*)(?:\.(\d{1,2}))?$/u;
|
||||
|
||||
@@ -16,7 +16,7 @@ export function isWorksTokenPointBalanceExhausted(
|
||||
balance: WorksTokenPointBalance | null | undefined,
|
||||
): boolean {
|
||||
if (!balance) return false;
|
||||
if (!balance.can_manage_membership && typeof balance.shared_available === 'boolean') {
|
||||
if (balance.family_shared && typeof balance.shared_available === 'boolean') {
|
||||
return !balance.shared_available;
|
||||
}
|
||||
const remaining = formatWorksTokenPointValue(balance.total_remaining);
|
||||
|
||||
Reference in new issue
Block a user