Display coinbase and op return messages all the time.
This commit is contained in:
		
							parent
							
								
									6662bc4646
								
							
						
					
					
						commit
						4bef9f9b79
					
				@ -35,7 +35,7 @@
 | 
			
		||||
              </td>
 | 
			
		||||
              <td>
 | 
			
		||||
                <div [ngSwitch]="true">
 | 
			
		||||
                  <ng-container *ngSwitchCase="vin.is_coinbase"><a placement="bottom" [ngbTooltip]="vin.scriptsig | hex2ascii">Coinbase<ng-template [ngIf]="network !== 'liquid'"> (Newly Generated Coins)</ng-template></a></ng-container>
 | 
			
		||||
                  <ng-container *ngSwitchCase="vin.is_coinbase"><a placement="bottom" [ngbTooltip]="vin.scriptsig | hex2ascii">Coinbase<ng-template [ngIf]="network !== 'liquid'"> (Newly Generated Coins)</ng-template></a><br><span class="badge badge-secondary scriptmessage longer">{{ vin.scriptsig | hex2ascii }}</span></ng-container>
 | 
			
		||||
                  <ng-container *ngSwitchCase="vin.is_pegin">
 | 
			
		||||
                    Peg-in
 | 
			
		||||
                  </ng-container>
 | 
			
		||||
@ -80,7 +80,7 @@
 | 
			
		||||
                    </a>
 | 
			
		||||
                  </ng-template>
 | 
			
		||||
                  <ng-template #defaultscriptpubkey_type>
 | 
			
		||||
                    <a placement="bottom" [ngbTooltip]="vout.scriptpubkey | hex2ascii">{{ vout.scriptpubkey_type | scriptpubkeyType }}</a>
 | 
			
		||||
                    <a placement="bottom" [ngbTooltip]="vout.scriptpubkey | hex2ascii">{{ vout.scriptpubkey_type | scriptpubkeyType }}</a> <span class="badge badge-secondary scriptmessage">{{ vout.scriptpubkey_asm | hex2ascii }}</span>
 | 
			
		||||
                  </ng-template>
 | 
			
		||||
                </ng-template>
 | 
			
		||||
              </td>
 | 
			
		||||
 | 
			
		||||
@ -59,8 +59,26 @@
 | 
			
		||||
  background-color:#6c757d;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.scriptmessage {
 | 
			
		||||
	max-width: 280px;
 | 
			
		||||
	overflow: hidden;
 | 
			
		||||
	text-overflow: ellipsis;
 | 
			
		||||
	vertical-align: middle;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.scriptmessage.longer {
 | 
			
		||||
	max-width: 500px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@media (max-width: 767.98px) {
 | 
			
		||||
	.mobile-bottomcol {
 | 
			
		||||
		margin-top: 15px;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	.scriptmessage {
 | 
			
		||||
		max-width: 90px !important;
 | 
			
		||||
	}
 | 
			
		||||
	.scriptmessage.longer {
 | 
			
		||||
		max-width: 280px !important;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@ -6,6 +6,12 @@ import { Pipe, PipeTransform } from '@angular/core';
 | 
			
		||||
export class Hex2asciiPipe implements PipeTransform {
 | 
			
		||||
 | 
			
		||||
  transform(hex: string): string {
 | 
			
		||||
    const opPush = hex.split(' ').filter((_, i, a) => i > 0 && /^OP_PUSH/.test(a[i - 1]));
 | 
			
		||||
 | 
			
		||||
    if (opPush[0]) {
 | 
			
		||||
      hex = opPush[0];
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (!hex) {
 | 
			
		||||
      return '';
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user