Esempio n. 1
0
        async Task <bool> RefreshBalance()
        {
            try
            {
                if (SelectedKey != null)
                {
                    var namespaceBalance = await tcBitcoin.NamespaceBalance(SelectedKey.KeyName);

                    textBalance.Text = $"{namespaceBalance} {TCBitcoin.MILLI_BITCOIN_NAME}";
                    var keyBalance = await tcBitcoin.KeyNameBalance(SelectedKey.KeyName);

                    if (keyBalance != namespaceBalance)
                    {
                        textBalance.Text = $"({keyBalance}) {namespaceBalance} {TCBitcoin.MILLI_BITCOIN_NAME}";
                    }
                }

                return(true);
            }
            catch
            {
                textBalance.Text = $"0.0 {TCBitcoin.MILLI_BITCOIN_NAME}";
                return(false);
            }
        }