Toggle display UTXO details and scripts for transactions

fixes #46
This commit is contained in:
softsimon
2020-11-15 17:58:38 +07:00
parent 6be353c1b3
commit 2b7ef0d287
5 changed files with 173 additions and 78 deletions

View File

@@ -16,6 +16,7 @@ import { map } from 'rxjs/operators';
export class TransactionsListComponent implements OnInit, OnChanges {
network = '';
nativeAssetId = environment.nativeAssetId;
displayDetails = false;
@Input() transactions: Transaction[];
@Input() showConfirmations = false;
@@ -95,4 +96,14 @@ export class TransactionsListComponent implements OnInit, OnChanges {
trackByIndexFn(index: number) {
return index;
}
formatHex(num: number): string {
const str = num.toString(16);
return '0x' + (str.length % 2 ? '0' : '') + str;
}
toggleDetails() {
this.displayDetails = !this.displayDetails;
this.ref.markForCheck();
}
}