Пример #1
0
        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;
        }
Пример #2
0
        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;
        }
Пример #3
0
        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);
        }