Altering bc1 regex matching to correctly require 39 characters
This commit is contained in:
		
							parent
							
								
									3e66e4d6db
								
							
						
					
					
						commit
						8a2b144e29
					
				@ -24,7 +24,7 @@ export class SearchFormComponent implements OnInit {
 | 
			
		||||
  typeAhead$: Observable<any>;
 | 
			
		||||
  searchForm: FormGroup;
 | 
			
		||||
 | 
			
		||||
  regexAddress = /^([a-km-zA-HJ-NP-Z1-9]{26,35}|[a-km-zA-HJ-NP-Z1-9]{80}|[a-z]{2,5}1[ac-hj-np-z02-9]{8,100}|[A-Z]{2,5}1[AC-HJ-NP-Z02-9]{8,100})$/;
 | 
			
		||||
  regexAddress = /^([a-km-zA-HJ-NP-Z1-9]{26,35}|[a-km-zA-HJ-NP-Z1-9]{80}|[A-z]{2,5}1[a-zA-HJ-NP-Z0-9]{39,59})$/;
 | 
			
		||||
  regexBlockhash = /^[0]{8}[a-fA-F0-9]{56}$/;
 | 
			
		||||
  regexTransaction = /^([a-fA-F0-9]{64})(:\d+)?$/;
 | 
			
		||||
  regexBlockheight = /^[0-9]{1,9}$/;
 | 
			
		||||
 | 
			
		||||
@ -14,7 +14,7 @@
 | 
			
		||||
  <ng-template [ngIf]="results.address">
 | 
			
		||||
    <div class="card-title">Bitcoin Address</div>
 | 
			
		||||
    <button (click)="clickItem(0)" [class.active]="0 === activeIdx" type="button" role="option" class="dropdown-item">
 | 
			
		||||
      Go to "{{ results.searchText | shortenString : 13 }}"
 | 
			
		||||
      Go to "{{ results.searchText | shortenString : isMobile ? 20 : 30 }}"
 | 
			
		||||
    </button>
 | 
			
		||||
  </ng-template>
 | 
			
		||||
  <ng-template [ngIf]="results.blockHash">
 | 
			
		||||
@ -24,7 +24,7 @@
 | 
			
		||||
    </button>
 | 
			
		||||
  </ng-template>
 | 
			
		||||
  <ng-template [ngIf]="results.addresses.length">
 | 
			
		||||
    <div class="card-title" *ngIf="stateService.env.LIGHTNING">Bitcoin Addresses</div>
 | 
			
		||||
    <div class="card-title">Bitcoin Addresses</div>
 | 
			
		||||
    <ng-template ngFor [ngForOf]="results.addresses" let-address let-i="index">
 | 
			
		||||
      <button (click)="clickItem(results.hashQuickMatch + i)" [class.active]="(results.hashQuickMatch + i) === activeIdx" type="button" role="option" class="dropdown-item">
 | 
			
		||||
        <ngb-highlight [result]="address | shortenString : isMobile ? 25 : 36" [term]="results.searchText"></ngb-highlight>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user