Merge pull request #3745 from mempool/mononaut/address-false-positive
Fix txids interpreted as addresses in search bar
This commit is contained in:
		
						commit
						bf9716bb7e
					
				@ -153,7 +153,7 @@ export class SearchFormComponent implements OnInit {
 | 
			
		||||
          const matchesBlockHeight = this.regexBlockheight.test(searchText);
 | 
			
		||||
          const matchesTxId = this.regexTransaction.test(searchText) && !this.regexBlockhash.test(searchText);
 | 
			
		||||
          const matchesBlockHash = this.regexBlockhash.test(searchText);
 | 
			
		||||
          const matchesAddress = this.regexAddress.test(searchText);
 | 
			
		||||
          const matchesAddress = !matchesTxId && this.regexAddress.test(searchText);
 | 
			
		||||
 | 
			
		||||
          if (matchesAddress && this.network === 'bisq') {
 | 
			
		||||
            searchText = 'B' + searchText;
 | 
			
		||||
@ -198,7 +198,7 @@ export class SearchFormComponent implements OnInit {
 | 
			
		||||
    const searchText = result || this.searchForm.value.searchText.trim();
 | 
			
		||||
    if (searchText) {
 | 
			
		||||
      this.isSearching = true;
 | 
			
		||||
      if (this.regexAddress.test(searchText)) {
 | 
			
		||||
      if (!this.regexTransaction.test(searchText) && this.regexAddress.test(searchText)) {
 | 
			
		||||
        this.navigate('/address/', searchText);
 | 
			
		||||
      } else if (this.regexBlockhash.test(searchText) || this.regexBlockheight.test(searchText)) {
 | 
			
		||||
        this.navigate('/block/', searchText);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user