Exemplo n.º 1
0
        public Addresses(walletViewModel model)
        {
            AddressesData = new List <addrData>();
            foreach (var addr in model.Addresses)
            {
                if (model.BalancePerAddress.ContainsKey(addr))
                {
                    AddressesData.Add(new addrData
                    {
                        address = addr,
                        balance = model.BalancePerAddress[addr].Item1 + model.BalancePerAddress[addr].Item2
                    });
                }
                else
                {
                    AddressesData.Add(new addrData {
                        address = addr, balance = decimal.Zero
                    });
                }
            }

            InitializeComponent();

            AddressesDataGrid.ItemsSource = AddressesData;
        }
Exemplo n.º 2
0
        public recieve(walletViewModel model)
        {
            Model = model;

            InitializeComponent();

            DataContext = this;
        }
Exemplo n.º 3
0
        public signMessage(walletViewModel model)
        {
            Model = model;

            InitializeComponent();

            DataContext = this;
        }
Exemplo n.º 4
0
        public overview(walletViewModel model)
        {
            Model = model;

            InitializeComponent();

            if (Model.TxRecords != null)
            {
                TxDataGrid.ItemsSource = Model.TxRecords.OrderByDescending(x => x.date).ToList();
            }

            DataContext = this;
        }
Exemplo n.º 5
0
        public send(walletViewModel model)
        {
            Model      = model;
            feeDisplay = string.Format("Low fee, {0}. sat/byte", Model.asyncData.low_fee_per_kb);
            feeValue   = Model.asyncData.low_fee_per_kb;

            NotEmptyPrivateKeys = new List <BitcoinExtKey>();
            foreach (var elem in Model.BalancePerAddress)
            {
                NotEmptyPrivateKeys.Add(Model.Wallet.FindPrivateKey(BitcoinAddress.Create(elem.Key)));
            }

            InitializeComponent();

            DataContext = this;
        }
Exemplo n.º 6
0
        public TxInfo(walletViewModel model, TxData tx)
        {
            Tx    = tx;
            Model = model;

            if (Tx.lockTime < 1)
            {
                Confirmations = 0;
            }
            else
            {
                Confirmations = Model.height - Tx.lockTime + 1;
            }

            InitializeComponent();

            DataContext = this;
        }
Exemplo n.º 7
0
        public privateKeys(walletViewModel model)
        {
            privateKeysList = new List <pKeys>();

            foreach (var addr in model.Addresses)
            {
                privateKeysList.Add(new pKeys
                {
                    address = addr,
                    key     = model.Wallet.FindPrivateKey(BitcoinAddress.Create(addr, Network.Main)).PrivateKey
                              .GetBitcoinSecret(Network.Main).ToString()
                });
            }

            InitializeComponent();

            privateKeyDataGrid.ItemsSource = privateKeysList;

            DataContext = this;
        }