diff --git a/frontend/src/app/components/transactions-list/transactions-list.component.html b/frontend/src/app/components/transactions-list/transactions-list.component.html index 1b3cc82eb..27c2150a7 100644 --- a/frontend/src/app/components/transactions-list/transactions-list.component.html +++ b/frontend/src/app/components/transactions-list/transactions-list.component.html @@ -142,7 +142,16 @@ P2WSH witness script - + +
+
+ ... + +
+ nSequence diff --git a/frontend/src/app/components/transactions-list/transactions-list.component.ts b/frontend/src/app/components/transactions-list/transactions-list.component.ts index 127f2dfe1..f0b1f34e3 100644 --- a/frontend/src/app/components/transactions-list/transactions-list.component.ts +++ b/frontend/src/app/components/transactions-list/transactions-list.component.ts @@ -48,6 +48,7 @@ export class TransactionsListComponent implements OnInit, OnChanges { transactionsLength: number = 0; inputRowLimit: number = 12; outputRowLimit: number = 12; + showFullScript: { [vinIndex: number]: boolean } = {}; constructor( public stateService: StateService, @@ -300,7 +301,9 @@ export class TransactionsListComponent implements OnInit, OnChanges { toggleDetails(): void { if (this.showDetails$.value === true) { this.showDetails$.next(false); + this.showFullScript = {}; } else { + this.showFullScript = this.transactions[0] ? this.transactions[0].vin.reduce((acc, _, i) => ({...acc, [i]: false}), {}) : {}; this.showDetails$.next(true); } } @@ -352,6 +355,10 @@ export class TransactionsListComponent implements OnInit, OnChanges { return limit; } + toggleShowFullScript(vinIndex: number): void { + this.showFullScript[vinIndex] = !this.showFullScript[vinIndex]; + } + ngOnDestroy(): void { this.outspendsSubscription.unsubscribe(); this.currencyChangeSubscription?.unsubscribe(); diff --git a/frontend/src/app/shared/pipes/asm-styler/asm-styler.pipe.ts b/frontend/src/app/shared/pipes/asm-styler/asm-styler.pipe.ts index 54a02e405..f152f2f54 100644 --- a/frontend/src/app/shared/pipes/asm-styler/asm-styler.pipe.ts +++ b/frontend/src/app/shared/pipes/asm-styler/asm-styler.pipe.ts @@ -5,13 +5,18 @@ import { Pipe, PipeTransform } from '@angular/core'; }) export class AsmStylerPipe implements PipeTransform { - transform(asm: string): string { + transform(asm: string, showAll = true): string { const instructions = asm.split('OP_'); let out = ''; + let chars = -3; for (const instruction of instructions) { if (instruction === '') { continue; } + if (!showAll && chars > 1000) { + break; + } + chars += instruction.length + 3; out += this.addStyling(instruction); } return out;