public string CurrencyTicker => Denomination.Bitcoin.Ticker; // TODO: Denomination should be modifiable by user public void UpdateAccountProperties(int requiredConfirmations, AccountProperties props) { RaisePropertyChanged(nameof(TotalBalance)); SpendableBalance = _wallet.CalculateSpendableBalance(_account, requiredConfirmations); ExternalAddressCount = props.ExternalKeyCount; InternalAddressCount = props.InternalKeyCount; ImportedAddressCount = props.ImportedKeyCount; }
public RecentAccountViewModel(ViewModelBase parent, Account account, AccountProperties properties) : base(parent) { if (parent == null) throw new ArgumentNullException(nameof(parent)); if (properties == null) throw new ArgumentNullException(nameof(properties)); Account = account; AccountName = properties.AccountName; Balance = properties.TotalBalance; }
public void UpdateAccountProperties(Account account, string name, uint externalKeyCount, uint internalKeyCount, uint importedKeyCount) { AccountProperties props; if (!_accounts.TryGetValue(account, out props)) { props = new AccountProperties(); _accounts[account] = props; } props.AccountName = name; props.ExternalKeyCount = externalKeyCount; props.InternalKeyCount = internalKeyCount; props.ImportedKeyCount = importedKeyCount; var eventArgs = new ChangesProcessedEventArgs(); eventArgs.ModifiedAccountProperties[account] = props; OnChangesProcessed(eventArgs); }