fixed lint + cleaning up
This commit is contained in:
parent
64aa9445de
commit
8734cf618a
@ -71,7 +71,6 @@ export class TransactionComponent {
|
|||||||
|
|
||||||
public aggregateItems(items: Array<any>): Array<any> {
|
public aggregateItems(items: Array<any>): Array<any> {
|
||||||
|
|
||||||
|
|
||||||
if (!items) return [];
|
if (!items) return [];
|
||||||
|
|
||||||
let l: number = items.length;
|
let l: number = items.length;
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import { HeadNavComponentModule } from '../../components/head-nav/head-nav.modul
|
|||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
InputOutputPage,
|
InputOutputPage
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
IonicPageModule.forChild(InputOutputPage),
|
IonicPageModule.forChild(InputOutputPage),
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import { ApiProvider } from '../../providers/api/api';
|
|||||||
})
|
})
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'page-input-output',
|
selector: 'page-input-output',
|
||||||
templateUrl: 'input-output.html',
|
templateUrl: 'input-output.html'
|
||||||
})
|
})
|
||||||
export class InputOutputPage {
|
export class InputOutputPage {
|
||||||
|
|
||||||
|
|||||||
@ -1,64 +0,0 @@
|
|||||||
<!--
|
|
||||||
Generated template for the InputPage page.
|
|
||||||
|
|
||||||
See http://ionicframework.com/docs/components/#navigation for more info on
|
|
||||||
Ionic pages and navigation.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<ion-header>
|
|
||||||
<head-nav [title]="'Transaction'"></head-nav>
|
|
||||||
</ion-header>
|
|
||||||
|
|
||||||
|
|
||||||
<ion-content padding>
|
|
||||||
<div *ngIf="loading">
|
|
||||||
<ion-spinner name="crescent"></ion-spinner>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div *ngIf="!loading" class="page-content">
|
|
||||||
<h1>Input Transaction | Index #{{ dxNm }}</h1>
|
|
||||||
<p class="item-hash">
|
|
||||||
<b>Transaction Hash</b> {{ tx.txid }}
|
|
||||||
</p>
|
|
||||||
<br><br>
|
|
||||||
<h2>Summary</h2>
|
|
||||||
|
|
||||||
<ion-list class="list--summary">
|
|
||||||
<ion-item>
|
|
||||||
Size
|
|
||||||
<ion-note item-end>
|
|
||||||
{{ tx.size }} (bytes)
|
|
||||||
</ion-note>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item>
|
|
||||||
Fee Rate
|
|
||||||
<ion-note item-end>
|
|
||||||
{{ (tx.fees / tx.size) * 1E8 | number:'1.0-8' }} sats/byte
|
|
||||||
</ion-note>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item>
|
|
||||||
Received Time
|
|
||||||
<ion-note item-end>
|
|
||||||
{{ tx.time * 1000 | date:'medium' }}
|
|
||||||
</ion-note>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item>
|
|
||||||
Mined Time
|
|
||||||
<ion-note item-end>
|
|
||||||
{{ tx.blocktime * 1000 | date:'medium' }}
|
|
||||||
</ion-note>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item>
|
|
||||||
Included in Block
|
|
||||||
<ion-note item-end>
|
|
||||||
<a (click)="goToBlock(tx.blockhash)">{{ tx.blockhash }}</a>
|
|
||||||
</ion-note>
|
|
||||||
</ion-item>
|
|
||||||
</ion-list>
|
|
||||||
<br>
|
|
||||||
<h2>Details</h2>
|
|
||||||
|
|
||||||
<transaction [tx]="tx" [dx]="dxNm"></transaction>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</ion-content>
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { IonicPageModule } from 'ionic-angular';
|
|
||||||
import { InputPage } from './input';
|
|
||||||
import { TransactionComponentModule } from '../../components/transaction/transaction.module';
|
|
||||||
import { HeadNavComponentModule } from '../../components/head-nav/head-nav.module';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [
|
|
||||||
InputPage
|
|
||||||
],
|
|
||||||
imports: [
|
|
||||||
IonicPageModule.forChild(InputPage),
|
|
||||||
TransactionComponentModule,
|
|
||||||
HeadNavComponentModule
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
InputPage
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class InputPageModule {}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
page-input {
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,56 +0,0 @@
|
|||||||
import { Component } from '@angular/core';
|
|
||||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
|
||||||
import { Http } from '@angular/http';
|
|
||||||
import { ApiProvider } from '../../providers/api/api';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generated class for the InputPage page.
|
|
||||||
*
|
|
||||||
* See http://ionicframework.com/docs/components/#navigation for more info
|
|
||||||
* on Ionic pages and navigation.
|
|
||||||
*/
|
|
||||||
@IonicPage({
|
|
||||||
name: 'input',
|
|
||||||
segment: 'tx/:txId/:dxNm'
|
|
||||||
})
|
|
||||||
@Component({
|
|
||||||
selector: 'page-input',
|
|
||||||
templateUrl: 'input.html'
|
|
||||||
})
|
|
||||||
export class InputPage {
|
|
||||||
|
|
||||||
public loading: boolean = true;
|
|
||||||
private txId: string;
|
|
||||||
public dxNm: number;
|
|
||||||
public tx: any = {};
|
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams, private http: Http, private api: ApiProvider) {
|
|
||||||
this.txId = navParams.get('txId');
|
|
||||||
this.dxNm = Number(navParams.get('dxNm'));
|
|
||||||
console.log(this.dxNm);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ionViewDidLoad() {
|
|
||||||
// console.log('ionViewDidLoad InputPage');
|
|
||||||
// }
|
|
||||||
|
|
||||||
public ionViewDidLoad(): void {
|
|
||||||
this.http.get(this.api.apiPrefix + 'tx/' + this.txId).subscribe(
|
|
||||||
(data) => {
|
|
||||||
this.tx = JSON.parse(data['_body']);
|
|
||||||
this.loading = false;
|
|
||||||
},
|
|
||||||
(err) => {
|
|
||||||
console.log('err is', err);
|
|
||||||
this.loading = false;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public goToBlock(blockHash: string): void {
|
|
||||||
this.navCtrl.push('block-detail', {
|
|
||||||
'blockHash': blockHash
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,63 +0,0 @@
|
|||||||
<!--
|
|
||||||
Generated template for the OutputPage page.
|
|
||||||
|
|
||||||
See http://ionicframework.com/docs/components/#navigation for more info on
|
|
||||||
Ionic pages and navigation.
|
|
||||||
-->
|
|
||||||
<ion-header>
|
|
||||||
<head-nav [title]="'Transaction'"></head-nav>
|
|
||||||
</ion-header>
|
|
||||||
|
|
||||||
|
|
||||||
<ion-content padding>
|
|
||||||
<div *ngIf="loading">
|
|
||||||
<ion-spinner name="crescent"></ion-spinner>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div *ngIf="!loading" class="page-content">
|
|
||||||
<h1>Output Transaction | Index #{{ dxNm }}</h1>
|
|
||||||
<p class="item-hash">
|
|
||||||
<b>Transaction Hash</b> {{ tx.txid }}
|
|
||||||
</p>
|
|
||||||
<br><br>
|
|
||||||
<h2>Summary</h2>
|
|
||||||
|
|
||||||
<ion-list class="list--summary">
|
|
||||||
<ion-item>
|
|
||||||
Size
|
|
||||||
<ion-note item-end>
|
|
||||||
{{ tx.size }} (bytes)
|
|
||||||
</ion-note>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item>
|
|
||||||
Fee Rate
|
|
||||||
<ion-note item-end>
|
|
||||||
{{ (tx.fees / tx.size) * 1E8 | number:'1.0-8' }} sats/byte
|
|
||||||
</ion-note>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item>
|
|
||||||
Received Time
|
|
||||||
<ion-note item-end>
|
|
||||||
{{ tx.time * 1000 | date:'medium' }}
|
|
||||||
</ion-note>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item>
|
|
||||||
Mined Time
|
|
||||||
<ion-note item-end>
|
|
||||||
{{ tx.blocktime * 1000 | date:'medium' }}
|
|
||||||
</ion-note>
|
|
||||||
</ion-item>
|
|
||||||
<ion-item>
|
|
||||||
Included in Block
|
|
||||||
<ion-note item-end>
|
|
||||||
<a (click)="goToBlock(tx.blockhash)">{{ tx.blockhash }}</a>
|
|
||||||
</ion-note>
|
|
||||||
</ion-item>
|
|
||||||
</ion-list>
|
|
||||||
<br>
|
|
||||||
<h2>Details</h2>
|
|
||||||
|
|
||||||
<transaction [tx]="tx" [dx]="dxNm"></transaction>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</ion-content>
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { IonicPageModule } from 'ionic-angular';
|
|
||||||
import { OutputPage } from './output';
|
|
||||||
import { TransactionComponentModule } from '../../components/transaction/transaction.module';
|
|
||||||
import { HeadNavComponentModule } from '../../components/head-nav/head-nav.module';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [
|
|
||||||
OutputPage
|
|
||||||
],
|
|
||||||
imports: [
|
|
||||||
IonicPageModule.forChild(OutputPage),
|
|
||||||
TransactionComponentModule,
|
|
||||||
HeadNavComponentModule
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
OutputPage
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class OutputPageModule {}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
page-output {
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,52 +0,0 @@
|
|||||||
import { Component } from '@angular/core';
|
|
||||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
|
||||||
import { Http } from '@angular/http';
|
|
||||||
import { ApiProvider } from '../../providers/api/api';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generated class for the OutputPage page.
|
|
||||||
*
|
|
||||||
* See http://ionicframework.com/docs/components/#navigation for more info
|
|
||||||
* on Ionic pages and navigation.
|
|
||||||
*/
|
|
||||||
@IonicPage({
|
|
||||||
name: 'output',
|
|
||||||
segment: 'tx/:txId/:dxNm'
|
|
||||||
})
|
|
||||||
@Component({
|
|
||||||
selector: 'page-output',
|
|
||||||
templateUrl: 'output.html'
|
|
||||||
})
|
|
||||||
export class OutputPage {
|
|
||||||
|
|
||||||
public loading: boolean = true;
|
|
||||||
private txId: string;
|
|
||||||
public dxNm: number;
|
|
||||||
public tx: any = {};
|
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams, private http: Http, private api: ApiProvider) {
|
|
||||||
this.txId = navParams.get('txId');
|
|
||||||
this.dxNm = Number(navParams.get('dxNm'));
|
|
||||||
console.log(this.dxNm);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ionViewDidLoad(): void {
|
|
||||||
this.http.get(this.api.apiPrefix + 'tx/' + this.txId).subscribe(
|
|
||||||
(data) => {
|
|
||||||
this.tx = JSON.parse(data['_body']);
|
|
||||||
this.loading = false;
|
|
||||||
},
|
|
||||||
(err) => {
|
|
||||||
console.log('err is', err);
|
|
||||||
this.loading = false;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public goToBlock(blockHash: string): void {
|
|
||||||
this.navCtrl.push('block-detail', {
|
|
||||||
'blockHash': blockHash
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user