コード例 #1
0
        /// <summary>
        /// Checks the gas limit entered in the gas limit field.
        /// </summary>
        /// <param name="gasLimit"> The entered gas limit. </param>
        private void CheckGasLimitField(string gasLimit)
        {
            BigInteger.TryParse(gasLimit, out enteredGasLimit);
            gasLimitField.Error = string.IsNullOrEmpty(gasLimit) || enteredGasLimit.IsZero;

            OnGasChanged?.Invoke();
        }
コード例 #2
0
        /// <summary>
        /// Checks the gas price entered in the gas price field.
        /// </summary>
        /// <param name="gasPrice"> The entered gas price. </param>
        private void CheckGasPriceField(string gasPrice)
        {
            decimal price;

            decimal.TryParse(gasPriceField.Text, out price);

            enteredGasPrice     = new GasPrice(GasUtils.GetFunctionalGasPrice(price));
            gasPriceField.Error = string.IsNullOrEmpty(gasPriceField.Text) || price == 0;

            OnGasChanged?.Invoke();
        }
コード例 #3
0
        /// <summary>
        /// Updates the estimated gas price based on the current progress of the transaction speed slider.
        /// </summary>
        /// <param name="newEstimate"> The new estimated gas price. </param>
        private void UpdateGasPriceEstimate(GasPrice newEstimate)
        {
            estimatedGasPrice = newEstimate;

            OnGasChanged?.Invoke();
        }