From 1b45f074193a6b726a597726d7bdf7dac102080f Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Mon, 23 Jun 2025 02:46:49 +0800 Subject: [PATCH] :bug: Fixes notification --- DysonNetwork.Sphere/Wallet/PaymentService.cs | 2 ++ DysonNetwork.Sphere/Wallet/SubscriptionService.cs | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/DysonNetwork.Sphere/Wallet/PaymentService.cs b/DysonNetwork.Sphere/Wallet/PaymentService.cs index 92e696d..4f7ee69 100644 --- a/DysonNetwork.Sphere/Wallet/PaymentService.cs +++ b/DysonNetwork.Sphere/Wallet/PaymentService.cs @@ -198,6 +198,8 @@ public class PaymentService( if (order.PayeeWallet is null) return; var account = await db.Accounts.FirstOrDefaultAsync(a => a.Id == order.PayeeWallet.AccountId); if (account is null) return; + + AccountService.SetCultureInfo(account); // Due to ID is uuid, it longer than 8 words for sure var readableOrderId = order.Id.ToString().Replace("-", "")[..8]; diff --git a/DysonNetwork.Sphere/Wallet/SubscriptionService.cs b/DysonNetwork.Sphere/Wallet/SubscriptionService.cs index 62b0dc6..3259041 100644 --- a/DysonNetwork.Sphere/Wallet/SubscriptionService.cs +++ b/DysonNetwork.Sphere/Wallet/SubscriptionService.cs @@ -319,13 +319,15 @@ public class SubscriptionService( { var account = await db.Accounts.FirstOrDefaultAsync(a => a.Id == subscription.AccountId); if (account is null) return; + + AccountService.SetCultureInfo(account); var humanReadableName = SubscriptionTypeData.SubscriptionHumanReadable.TryGetValue(subscription.Identifier, out var humanReadable) ? humanReadable : subscription.Identifier; var duration = subscription.EndedAt is not null - ? subscription.EndedAt.Value.Minus(subscription.BegunAt).ToString() + ? subscription.EndedAt.Value.Minus(subscription.BegunAt).Days.ToString() : "infinite"; await nty.SendNotification(