예제 #1
0
 private void ValidateToField(IValidationErrors errors)
 {
     if (!string.IsNullOrWhiteSpace(To) &&
         !AddressStringParser.TryParse(To, _owner.Wallet.Network, out BitcoinUrlBuilder? url))
     {
         errors.Add(ErrorSeverity.Error, "Input a valid BTC address or URL.");
     }
 }
예제 #2
0
        private bool TryParseUrl(string text)
        {
            bool result = false;

            var wallet = _owner.Wallet;

            if (AddressStringParser.TryParse(text, wallet.Network, out BitcoinUrlBuilder? url))
            {
                result = true;
                SmartLabel label = url.Label;

                if (!label.IsEmpty)
                {
                    //LabelSuggestion.Label = label;
                }

                if (url.Address is { })
예제 #3
0
        private bool TryParseUrl(string text)
        {
            bool result = false;

            var wallet = _owner.Wallet;

            if (AddressStringParser.TryParse(text, wallet.Network, out BitcoinUrlBuilder? url))
            {
                result = true;
                SmartLabel label = url.Label;

                if (!label.IsEmpty)
                {
                    Labels.Clear();

                    foreach (var labelString in label.Labels)
                    {
                        Labels.Add(labelString);
                    }
                }

                if (url.Address is { })