2022-09-17 01:20:08 +00:00
|
|
|
<div
|
|
|
|
#tooltip
|
|
|
|
*ngIf="line"
|
|
|
|
class="bowtie-graph-tooltip"
|
|
|
|
[style.visibility]="line ? 'visible' : 'hidden'"
|
|
|
|
[style.left]="tooltipPosition.x + 'px'"
|
|
|
|
[style.top]="tooltipPosition.y + 'px'"
|
|
|
|
>
|
2022-09-17 17:23:44 +00:00
|
|
|
<ng-container *ngIf="line.rest; else coinbase">
|
2022-09-17 01:20:08 +00:00
|
|
|
<span>{{ line.rest }} </span>
|
|
|
|
<ng-container [ngSwitch]="line.type">
|
|
|
|
<span *ngSwitchCase="'input'" i18n="transaction.other-inputs">other inputs</span>
|
|
|
|
<span *ngSwitchCase="'output'" i18n="transaction.other-outputs">other outputs</span>
|
|
|
|
</ng-container>
|
2022-09-17 17:23:44 +00:00
|
|
|
</ng-container>
|
|
|
|
|
|
|
|
<ng-template #coinbase>
|
|
|
|
<ng-container *ngIf="line.coinbase; else pegin">
|
2023-11-25 17:49:37 +09:00
|
|
|
<p i18n="transactions-list.coinbase">Coinbase</p>
|
2022-09-17 17:23:44 +00:00
|
|
|
</ng-container>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template #pegin>
|
|
|
|
<ng-container *ngIf="line.pegin; else pegout">
|
2022-11-22 10:05:14 +09:00
|
|
|
<p *ngIf="!isConnector">Peg In</p>
|
2022-09-17 17:23:44 +00:00
|
|
|
</ng-container>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template #pegout>
|
|
|
|
<ng-container *ngIf="line.pegout; else normal">
|
2022-11-22 10:05:14 +09:00
|
|
|
<p *ngIf="!isConnector">Peg Out</p>
|
2023-03-29 07:41:45 +09:00
|
|
|
<p *ngIf="line.displayValue != null"><app-amount [satoshis]="line.displayValue"></app-amount></p>
|
2022-09-17 17:23:44 +00:00
|
|
|
<p class="address">
|
2023-01-05 11:01:46 -06:00
|
|
|
<app-truncate [text]="line.pegout"></app-truncate>
|
2022-09-17 17:23:44 +00:00
|
|
|
</p>
|
|
|
|
</ng-container>
|
2022-09-17 01:20:08 +00:00
|
|
|
</ng-template>
|
|
|
|
|
2022-09-17 17:23:44 +00:00
|
|
|
<ng-template #normal>
|
2022-11-22 10:05:14 +09:00
|
|
|
<p *ngIf="!isConnector">
|
2022-09-17 17:23:44 +00:00
|
|
|
<ng-container [ngSwitch]="line.type">
|
|
|
|
<span *ngSwitchCase="'input'" i18n="transaction.input">Input</span>
|
|
|
|
<span *ngSwitchCase="'output'" i18n="transaction.output">Output</span>
|
2022-10-13 17:15:17 +04:00
|
|
|
<span *ngSwitchCase="'fee'" i18n="transaction.fee|Transaction fee">Fee</span>
|
2022-09-17 17:23:44 +00:00
|
|
|
</ng-container>
|
2022-10-04 21:00:46 +00:00
|
|
|
<span *ngIf="line.type !== 'fee'"> #{{ line.index + 1 }}</span>
|
2024-03-17 16:25:36 +09:00
|
|
|
<ng-container [ngSwitch]="line.type">
|
|
|
|
<span *ngSwitchCase="'input'">
|
|
|
|
<ng-container *ngIf="line.status?.block_height">
|
|
|
|
<ng-container *ngIf="line.blockHeight; else noBlockHeight">
|
|
|
|
<ng-container *ngTemplateOutlet="nBlocksAgo; context:{n: line.blockHeight - line?.status?.block_height, connector: false}"></ng-container>
|
|
|
|
</ng-container>
|
|
|
|
<ng-template #noBlockHeight>
|
|
|
|
<ng-container *ngTemplateOutlet="nBlocksAgo; context:{n: chainTip + 1 - line?.status?.block_height, connector: false}"></ng-container>
|
|
|
|
</ng-template>
|
|
|
|
</ng-container>
|
|
|
|
</span>
|
|
|
|
<span *ngSwitchCase="'output'">
|
|
|
|
<ng-container *ngIf="line.blockHeight && line?.spent">
|
|
|
|
<ng-container *ngIf="line?.status?.block_height; else noBlockHeight">
|
|
|
|
<ng-container *ngTemplateOutlet="nBlocksLater; context:{n: line?.status?.block_height - line.blockHeight, connector: false}"></ng-container>
|
|
|
|
</ng-container>
|
|
|
|
<ng-template #noBlockHeight>
|
|
|
|
<ng-container *ngTemplateOutlet="nBlocksLater; context:{n: chainTip + 1 - line.blockHeight, connector: false}"></ng-container>
|
|
|
|
</ng-template>
|
|
|
|
</ng-container>
|
|
|
|
</span>
|
|
|
|
</ng-container>
|
2022-09-17 17:23:44 +00:00
|
|
|
</p>
|
2022-11-22 10:05:14 +09:00
|
|
|
<ng-container *ngIf="isConnector && line.txid">
|
|
|
|
<p>
|
|
|
|
<span i18n="transaction">Transaction</span>
|
2023-01-05 11:01:46 -06:00
|
|
|
<app-truncate [text]="line.txid"></app-truncate>
|
2022-11-22 10:05:14 +09:00
|
|
|
</p>
|
|
|
|
<ng-container [ngSwitch]="line.type">
|
2024-03-17 16:25:36 +09:00
|
|
|
<p *ngSwitchCase="'input'"><span i18n="transaction.output">Output</span> #{{ line.vout + 1 }}
|
|
|
|
<ng-container *ngIf="line.status?.block_height">
|
|
|
|
<ng-container *ngIf="line.blockHeight; else noBlockHeight">
|
|
|
|
<ng-container *ngTemplateOutlet="nBlocksAgo; context:{n: line.blockHeight - line?.status?.block_height, connector: true}"></ng-container>
|
|
|
|
</ng-container>
|
|
|
|
<ng-template #noBlockHeight>
|
|
|
|
<ng-container *ngTemplateOutlet="nBlocksAgo; context:{n: chainTip + 1 - line?.status?.block_height, connector: true}"></ng-container>
|
|
|
|
</ng-template>
|
|
|
|
</ng-container>
|
|
|
|
</p>
|
|
|
|
<p *ngSwitchCase="'output'"><span i18n="transaction.input">Input</span> #{{ line.vin + 1 }}
|
|
|
|
<ng-container *ngIf="line.blockHeight">
|
|
|
|
<ng-container *ngIf="line?.status?.block_height; else noBlockHeight">
|
|
|
|
<ng-container *ngTemplateOutlet="nBlocksLater; context:{n: line?.status?.block_height - line.blockHeight, connector: true}"></ng-container>
|
|
|
|
</ng-container>
|
|
|
|
<ng-template #noBlockHeight>
|
|
|
|
<ng-container *ngTemplateOutlet="nBlocksLater; context:{n: chainTip + 1 - line.blockHeight, connector: true}"></ng-container>
|
|
|
|
</ng-template>
|
|
|
|
</ng-container>
|
|
|
|
</p>
|
2022-11-22 10:05:14 +09:00
|
|
|
</ng-container>
|
|
|
|
</ng-container>
|
2023-03-29 07:41:45 +09:00
|
|
|
<p *ngIf="line.displayValue == null && line.confidential" i18n="shared.confidential">Confidential</p>
|
|
|
|
<p *ngIf="line.displayValue != null">
|
2023-03-12 17:36:45 +09:00
|
|
|
<ng-template [ngIf]="line.asset && line.asset !== nativeAssetId" [ngIfElse]="defaultOutput">
|
|
|
|
<div *ngIf="assetsMinimal && assetsMinimal[line.asset] else assetNotFound">
|
|
|
|
<ng-container *ngTemplateOutlet="assetBox; context:{ $implicit: line }"></ng-container>
|
|
|
|
</div>
|
|
|
|
<ng-template #assetNotFound>
|
2023-03-29 07:41:45 +09:00
|
|
|
{{ line.displayValue }} <span class="symbol">{{ line.asset | slice : 0 : 7 }}</span>
|
2023-03-12 17:36:45 +09:00
|
|
|
</ng-template>
|
|
|
|
</ng-template>
|
|
|
|
<ng-template #defaultOutput>
|
2024-03-17 16:25:36 +09:00
|
|
|
<app-amount [blockConversion]="isConnector ? blockConversions[line?.status?.block_time] : blockConversions[line?.timestamp]" [satoshis]="line.displayValue" [forceBlockConversion]="isConnector && line?.status?.block_time"></app-amount>
|
2023-03-12 17:36:45 +09:00
|
|
|
</ng-template>
|
|
|
|
</p>
|
2022-09-17 17:23:44 +00:00
|
|
|
<p *ngIf="line.type !== 'fee' && line.address" class="address">
|
2023-01-05 11:01:46 -06:00
|
|
|
<app-truncate [text]="line.address"></app-truncate>
|
2022-09-17 17:23:44 +00:00
|
|
|
</p>
|
|
|
|
</ng-template>
|
2022-09-17 01:20:08 +00:00
|
|
|
</div>
|
2023-03-12 17:36:45 +09:00
|
|
|
|
|
|
|
<ng-template #assetBox let-item>
|
2023-03-29 07:41:45 +09:00
|
|
|
{{ item.displayValue / pow(10, assetsMinimal[item.asset][3]) | number: '1.' + assetsMinimal[item.asset][3] + '-' + assetsMinimal[item.asset][3] }} <span class="symbol">{{ assetsMinimal[item.asset][1] }}</span>
|
2024-03-17 16:25:36 +09:00
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template #oneBlockAgo>
|
|
|
|
<span i18n="shared.one-block-ago">1 block ago</span>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template #oneBlockLater>
|
|
|
|
<span i18n="shared.one-block-later">1 block later</span>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template #inTheSameBlock>
|
|
|
|
<span i18n="shared.in-the-same-block">in the same block</span>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template #nBlocksAgo let-n="n" let-connector="connector">
|
|
|
|
(<span *ngIf="!connector">prevout </span>
|
|
|
|
<ng-container *ngIf="n > 1">
|
|
|
|
<span>{{ n }} <ng-container i18n="shared.n-blocks-ago">blocks ago</ng-container>)</span>
|
|
|
|
</ng-container>
|
|
|
|
<ng-container *ngIf="n === 1">
|
|
|
|
<span><ng-container *ngTemplateOutlet="oneBlockAgo"></ng-container>)</span>
|
|
|
|
</ng-container>
|
|
|
|
<ng-container *ngIf="n === 0">
|
|
|
|
<span><ng-container *ngTemplateOutlet="inTheSameBlock"></ng-container>)</span>
|
|
|
|
</ng-container>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template #nBlocksLater let-n="n" let-connector="connector">
|
|
|
|
(<span *ngIf="!connector" i18n="shared.spent">spent </span>
|
|
|
|
<ng-container *ngIf="n > 1">
|
|
|
|
<span>{{ n }} <ng-container i18n="shared.n-blocks-later">blocks later</ng-container>)</span>
|
|
|
|
</ng-container>
|
|
|
|
<ng-container *ngIf="n === 1">
|
|
|
|
<span><ng-container *ngTemplateOutlet="oneBlockLater"></ng-container>)</span>
|
|
|
|
</ng-container>
|
|
|
|
<ng-container *ngIf="n === 0">
|
|
|
|
<span><ng-container *ngTemplateOutlet="inTheSameBlock"></ng-container>)</span>
|
|
|
|
</ng-container>
|
2023-03-12 17:36:45 +09:00
|
|
|
</ng-template>
|