예제 #1
0
        public static double?GetStandardBalance(HttpProvider httpProvider, byte[] destination)
        {
            LargeInteger smallUnitsBalance = GetSmallUnitsBalance(httpProvider, mainWindow.ActiveWallet.PublicKey);

            double?ret = null;

            if (smallUnitsBalance != null)
            {
                ret = SendTransactionWindow.GetStandardUnits(smallUnitsBalance);
            }

            return(ret);
        }
예제 #2
0
        public async Task Execute(IJobExecutionContext context)
        {
            bool connected = Handshake(httpProvider);

            double?balance = null;

            if (mainWindow.ActiveWallet != null)
            {
                var smallUnitsBalance = GetSmallUnitsBalance(httpProvider, mainWindow.ActiveWallet.PublicKey);

                if (smallUnitsBalance != null)
                {
                    balance = SendTransactionWindow.GetStandardUnits(smallUnitsBalance);
                }
            }

            mainWindow.Dispatcher.Invoke(() =>
            {
                mainWindow.RefreshUi(connected, balance);
            });
        }