Exemplo n.º 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.");
     }
 }
Exemplo n.º 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 { })
Exemplo n.º 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 { })