Add output ID to transaction info

fixes #413
This commit is contained in:
softsimon
2021-10-19 23:24:12 +04:00
parent 39d231bb3c
commit 1a37c8b116
5 changed files with 28 additions and 15 deletions

View File

@@ -198,7 +198,7 @@
<div class="clearfix"></div>
<app-transactions-list #txList [transactions]="[tx]" [errorUnblinded]="errorUnblinded" [transactionPage]="true"></app-transactions-list>
<app-transactions-list #txList [transactions]="[tx]" [errorUnblinded]="errorUnblinded" [outputIndex]="outputIndex" [transactionPage]="true"></app-transactions-list>
<h2 class="text-left" i18n="transaction.details">Details</h2>
<div class="box">

View File

@@ -44,6 +44,7 @@ export class TransactionComponent implements OnInit, OnDestroy {
now = new Date().getTime();
timeAvg$: Observable<number>;
liquidUnblinding = new LiquidUnblinding();
outputIndex: number;
constructor(
private route: ActivatedRoute,
@@ -125,7 +126,9 @@ export class TransactionComponent implements OnInit, OnDestroy {
this.subscription = this.route.paramMap
.pipe(
switchMap((params: ParamMap) => {
this.txId = params.get('id') || '';
const urlMatch = (params.get('id') || '').split(':');
this.txId = urlMatch[0];
this.outputIndex = urlMatch[1] === undefined ? null : parseInt(urlMatch[1], 10);
this.seoService.setTitle(
$localize`:@@bisq.transaction.browser-title:Transaction: ${this.txId}:INTERPOLATION:`
);