Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
BalanceNotificationEvent.cs
1using EDaler;
7
9{
14 {
19 : base()
20 {
21 }
22
27 public BalanceNotificationEvent(BalanceEventArgs e)
28 : base(e)
29 {
30 this.Amount = e.Balance.Amount;
31 this.Currency = e.Balance.Currency;
32 this.Event = e.Balance.Event;
33 this.Reserved = e.Balance.Reserved;
34 this.Timestamp = e.Balance.Timestamp;
35 this.Category = e.Balance.Event?.TransactionId.ToString() ?? string.Empty;
36 }
37
41 public decimal Amount { get; set; }
42
46 public decimal Reserved { get; set; }
47
51 public CaseInsensitiveString? Currency { get; set; }
52
56 public AccountEvent? Event { get; set; }
57
61 public override async Task<string> GetDescription()
62 {
63 if (string.IsNullOrEmpty(this.Event?.Remote))
64 return ServiceRef.Localizer[nameof(AppResources.BalanceUpdated)];
65 else
66 return await ContactInfo.GetFriendlyName(this.Event.Remote);
67 }
68
72 public override async Task Open()
73 {
74 if ((this.Event?.Change ?? 0) > 0)
75 {
76 Balance Balance = new(this.Timestamp, this.Amount, this.Reserved, this.Currency, this.Event);
77
79 }
80 else
81 await ServiceRef.NeuroWalletOrchestratorService.OpenEDalerWallet();
82 }
83 }
84}
Account event
Definition: AccountEvent.cs:16
CaseInsensitiveString Remote
Remote party
Definition: AccountEvent.cs:56
Contains information about a balance.
Definition: Balance.cs:11
Contains information about a contact.
Definition: ContactInfo.cs:21
static async Task< string > GetFriendlyName(CaseInsensitiveString RemoteId)
Gets the friendly name of a remote identity (Legal ID or Bare JID).
Definition: ContactInfo.cs:257
BalanceNotificationEvent(BalanceEventArgs e)
Contains information about an incoming chat message.
BalanceNotificationEvent()
Contains information about an incoming chat message.
override async Task< string > GetDescription()
Gets a descriptive text for the event.
Base class that references services in the app.
Definition: ServiceRef.cs:31
static IUiService UiService
Service serializing and managing UI-related tasks.
Definition: ServiceRef.cs:55
static INeuroWalletOrchestratorService NeuroWalletOrchestratorService
Neuro Wallet orchestrator service.
Definition: ServiceRef.cs:139
static IStringLocalizer Localizer
Localization service
Definition: ServiceRef.cs:235
Holds navigation parameters specific to an eDaler balance event.
A page that displays information about eDaler received.
Represents a case-insensitive string.