From 8734cf618a9c40317cdc980a877866d21c26ebd2 Mon Sep 17 00:00:00 2001 From: Ash Bhimasani <16abhimasani@gmail.com> Date: Fri, 1 Jun 2018 11:02:01 -0400 Subject: [PATCH] fixed lint + cleaning up --- app/src/components/transaction/transaction.ts | 1 - .../pages/input-output/input-output.module.ts | 2 +- app/src/pages/input-output/input-output.ts | 2 +- app/src/pages/input/input.html | 64 ------------------- app/src/pages/input/input.module.ts | 20 ------ app/src/pages/input/input.scss | 3 - app/src/pages/input/input.ts | 56 ---------------- app/src/pages/output/output.html | 63 ------------------ app/src/pages/output/output.module.ts | 20 ------ app/src/pages/output/output.scss | 3 - app/src/pages/output/output.ts | 52 --------------- 11 files changed, 2 insertions(+), 284 deletions(-) delete mode 100644 app/src/pages/input/input.html delete mode 100644 app/src/pages/input/input.module.ts delete mode 100644 app/src/pages/input/input.scss delete mode 100644 app/src/pages/input/input.ts delete mode 100644 app/src/pages/output/output.html delete mode 100644 app/src/pages/output/output.module.ts delete mode 100644 app/src/pages/output/output.scss delete mode 100644 app/src/pages/output/output.ts diff --git a/app/src/components/transaction/transaction.ts b/app/src/components/transaction/transaction.ts index c3dd62c..98928bc 100644 --- a/app/src/components/transaction/transaction.ts +++ b/app/src/components/transaction/transaction.ts @@ -71,7 +71,6 @@ export class TransactionComponent { public aggregateItems(items: Array): Array { - if (!items) return []; let l: number = items.length; diff --git a/app/src/pages/input-output/input-output.module.ts b/app/src/pages/input-output/input-output.module.ts index c8021c1..f2a3401 100644 --- a/app/src/pages/input-output/input-output.module.ts +++ b/app/src/pages/input-output/input-output.module.ts @@ -6,7 +6,7 @@ import { HeadNavComponentModule } from '../../components/head-nav/head-nav.modul @NgModule({ declarations: [ - InputOutputPage, + InputOutputPage ], imports: [ IonicPageModule.forChild(InputOutputPage), diff --git a/app/src/pages/input-output/input-output.ts b/app/src/pages/input-output/input-output.ts index e7215ff..d94751b 100644 --- a/app/src/pages/input-output/input-output.ts +++ b/app/src/pages/input-output/input-output.ts @@ -15,7 +15,7 @@ import { ApiProvider } from '../../providers/api/api'; }) @Component({ selector: 'page-input-output', - templateUrl: 'input-output.html', + templateUrl: 'input-output.html' }) export class InputOutputPage { diff --git a/app/src/pages/input/input.html b/app/src/pages/input/input.html deleted file mode 100644 index d5bede7..0000000 --- a/app/src/pages/input/input.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - -
- -
- -
-

Input Transaction | Index #{{ dxNm }}

-

- Transaction Hash {{ tx.txid }} -

-

-

Summary

- - - - Size - - {{ tx.size }} (bytes) - - - - Fee Rate - - {{ (tx.fees / tx.size) * 1E8 | number:'1.0-8' }} sats/byte - - - - Received Time - - {{ tx.time * 1000 | date:'medium' }} - - - - Mined Time - - {{ tx.blocktime * 1000 | date:'medium' }} - - - - Included in Block - - {{ tx.blockhash }} - - - -
-

Details

- - -
- -
diff --git a/app/src/pages/input/input.module.ts b/app/src/pages/input/input.module.ts deleted file mode 100644 index 9729a23..0000000 --- a/app/src/pages/input/input.module.ts +++ /dev/null @@ -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 {} diff --git a/app/src/pages/input/input.scss b/app/src/pages/input/input.scss deleted file mode 100644 index 019e5fd..0000000 --- a/app/src/pages/input/input.scss +++ /dev/null @@ -1,3 +0,0 @@ -page-input { - -} diff --git a/app/src/pages/input/input.ts b/app/src/pages/input/input.ts deleted file mode 100644 index 8abd2b0..0000000 --- a/app/src/pages/input/input.ts +++ /dev/null @@ -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 - }); - } - -} diff --git a/app/src/pages/output/output.html b/app/src/pages/output/output.html deleted file mode 100644 index 0a62959..0000000 --- a/app/src/pages/output/output.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - -
- -
- -
-

Output Transaction | Index #{{ dxNm }}

-

- Transaction Hash {{ tx.txid }} -

-

-

Summary

- - - - Size - - {{ tx.size }} (bytes) - - - - Fee Rate - - {{ (tx.fees / tx.size) * 1E8 | number:'1.0-8' }} sats/byte - - - - Received Time - - {{ tx.time * 1000 | date:'medium' }} - - - - Mined Time - - {{ tx.blocktime * 1000 | date:'medium' }} - - - - Included in Block - - {{ tx.blockhash }} - - - -
-

Details

- - -
- -
diff --git a/app/src/pages/output/output.module.ts b/app/src/pages/output/output.module.ts deleted file mode 100644 index 298d9c7..0000000 --- a/app/src/pages/output/output.module.ts +++ /dev/null @@ -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 {} diff --git a/app/src/pages/output/output.scss b/app/src/pages/output/output.scss deleted file mode 100644 index eba3892..0000000 --- a/app/src/pages/output/output.scss +++ /dev/null @@ -1,3 +0,0 @@ -page-output { - -} diff --git a/app/src/pages/output/output.ts b/app/src/pages/output/output.ts deleted file mode 100644 index eba3c6a..0000000 --- a/app/src/pages/output/output.ts +++ /dev/null @@ -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 - }); - } - -}