diff --git a/OneGateApp/AppShell.xaml.cs b/OneGateApp/AppShell.xaml.cs index 391dfff..49aefab 100644 --- a/OneGateApp/AppShell.xaml.cs +++ b/OneGateApp/AppShell.xaml.cs @@ -50,5 +50,6 @@ static AppShell() Routing.RegisterRoute("wallet/receive", typeof(ReceivePage)); Routing.RegisterRoute("wallet/send", typeof(SendPage)); Routing.RegisterRoute("wallet/sending", typeof(SendingPage)); + Routing.RegisterRoute("wallet/transactions", typeof(TransactionHistoryPage)); } } diff --git a/OneGateApp/MauiProgram.cs b/OneGateApp/MauiProgram.cs index 82254da..94bc41a 100644 --- a/OneGateApp/MauiProgram.cs +++ b/OneGateApp/MauiProgram.cs @@ -107,6 +107,7 @@ static MauiAppBuilder RegisterServices(this MauiAppBuilder builder) return ProtocolSettings.Load(stream); }); builder.Services.AddSingleton(); + builder.Services.AddSingleton(); builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddSingleton(); diff --git a/OneGateApp/Models/TransactionHistoryItem.cs b/OneGateApp/Models/TransactionHistoryItem.cs new file mode 100644 index 0000000..1cdff38 --- /dev/null +++ b/OneGateApp/Models/TransactionHistoryItem.cs @@ -0,0 +1,16 @@ +namespace NeoOrder.OneGate.Models; + +public sealed class TransactionHistoryItem +{ + public required string Title { get; init; } + public string? AmountText { get; init; } + public string? DirectionText { get; init; } + public required string TimeText { get; init; } + public string? CounterpartyText { get; init; } + public required string TransactionHash { get; init; } + public string? BlockText { get; init; } + public bool HasAmountText => !string.IsNullOrWhiteSpace(AmountText); + public bool HasDirectionText => !string.IsNullOrWhiteSpace(DirectionText); + public bool HasCounterpartyText => !string.IsNullOrWhiteSpace(CounterpartyText); + public bool HasBlockText => !string.IsNullOrWhiteSpace(BlockText); +} diff --git a/OneGateApp/Pages/TransactionHistoryPage.xaml b/OneGateApp/Pages/TransactionHistoryPage.xaml new file mode 100644 index 0000000..ea2a385 --- /dev/null +++ b/OneGateApp/Pages/TransactionHistoryPage.xaml @@ -0,0 +1,57 @@ + + + + + + + + + + +