From 4bceb119eabc71ff15e1348d75694bab321b4041 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sat, 9 Aug 2025 21:34:30 +0800 Subject: [PATCH] :bug: Fix subscription status wrong --- DysonNetwork.Pass/Wallet/SubscriptionService.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/DysonNetwork.Pass/Wallet/SubscriptionService.cs b/DysonNetwork.Pass/Wallet/SubscriptionService.cs index adcc365..d789e7b 100644 --- a/DysonNetwork.Pass/Wallet/SubscriptionService.cs +++ b/DysonNetwork.Pass/Wallet/SubscriptionService.cs @@ -424,8 +424,11 @@ public class SubscriptionService( } // If not in cache, get from database + var now = SystemClock.Instance.GetCurrentInstant(); var subscription = await db.WalletSubscriptions .Where(s => s.AccountId == accountId && PerkIdentifiers.Contains(s.Identifier)) + .Where(s => s.Status == SubscriptionStatus.Active) + .Where(s => s.EndedAt == null || s.EndedAt > now) .OrderByDescending(s => s.BegunAt) .FirstOrDefaultAsync();