♻️ Splitted wallet service

This commit is contained in:
2026-02-03 02:18:02 +08:00
parent bb9105c78c
commit 9a1f36ee26
43 changed files with 623 additions and 590 deletions

View File

@@ -7,6 +7,9 @@ using System.Text.Json.Serialization;
using DysonNetwork.Shared.Cache;
using DysonNetwork.Shared.Geometry;
using DysonNetwork.Shared.Registry;
using DysonNetwork.Wallet.Localization;
using DysonNetwork.Wallet.Payment;
using DysonNetwork.Wallet.Payment.PaymentHandlers;
namespace DysonNetwork.Wallet.Startup;
@@ -39,6 +42,10 @@ public static class ServiceCollectionExtensions
options.JsonSerializerOptions.DictionaryKeyPolicy = JsonNamingPolicy.SnakeCaseLower;
options.JsonSerializerOptions.ConfigureForNodaTime(DateTimeZoneProviders.Tzdb);
}).AddDataAnnotationsLocalization(options =>
{
options.DataAnnotationLocalizerProvider = (type, factory) =>
factory.Create(typeof(NotificationResource));
});
services.AddRazorPages();
@@ -82,6 +89,12 @@ public static class ServiceCollectionExtensions
services.Configure<GeoOptions>(configuration.GetSection("GeoIP"));
services.AddScoped<GeoService>();
// Register Wallet services
services.AddScoped<WalletService>();
services.AddScoped<PaymentService>();
services.AddScoped<SubscriptionService>();
services.AddScoped<AfdianPaymentHandler>();
services.AddHostedService<BroadcastEventHandler>();
return services;