Compare commits

...

2 Commits

Author SHA1 Message Date
eb83a0392a 👔 Update level requirements of purchase Stellar Program 2025-10-03 17:16:53 +08:00
85fefcf724 🐛 Fix subscription check 2025-10-03 17:16:18 +08:00
2 changed files with 3 additions and 12 deletions

View File

@@ -79,15 +79,6 @@ public class SubscriptionService(
var couponData = await couponTask;
// Validation checks
if (subscriptionInfo.RequiredLevel > 0)
{
if (profile is null)
throw new InvalidOperationException("Account profile was not found.");
if (profile.Level < subscriptionInfo.RequiredLevel)
throw new InvalidOperationException(
$"Account level must be at least {subscriptionInfo.RequiredLevel} to subscribe to {identifier}."
);
}
if (isFreeTrial && prevFreeTrial != null)
throw new InvalidOperationException("Free trial already exists.");

View File

@@ -30,21 +30,21 @@ public record class SubscriptionTypeData(
SubscriptionType.StellarProgram,
WalletCurrency.SourcePoint,
1200,
3
20
),
[SubscriptionType.Nova] = new SubscriptionTypeData(
SubscriptionType.Nova,
SubscriptionType.StellarProgram,
WalletCurrency.SourcePoint,
2400,
6
40
),
[SubscriptionType.Supernova] = new SubscriptionTypeData(
SubscriptionType.Supernova,
SubscriptionType.StellarProgram,
WalletCurrency.SourcePoint,
3600,
9
60
)
};