From 67166fe5b68cd45acc488f60b437032a1b5eee01 Mon Sep 17 00:00:00 2001 From: Darren Nelsen Date: Mon, 21 May 2018 16:05:34 -0400 Subject: [PATCH 1/2] fix bug that crashes block page with unparsed addresses (because of trying to split scriptSig.asm that is not present) --- app/src/components/transaction/transaction.html | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/src/components/transaction/transaction.html b/app/src/components/transaction/transaction.html index 7a678c0..48f38a7 100644 --- a/app/src/components/transaction/transaction.html +++ b/app/src/components/transaction/transaction.html @@ -47,10 +47,8 @@

-
-
-

{{ scriptSig }}

-
+
+

{{ item.scriptSig.asm }}

@@ -87,7 +85,7 @@ Locking Script

-

{{vout.scriptPubKey.asm}}

+

{{ vout.scriptPubKey.asm }}

@@ -128,4 +126,4 @@ - \ No newline at end of file + From 80c5dc156113f62fc18886c8cf10ae8ba06596c9 Mon Sep 17 00:00:00 2001 From: Darren Nelsen Date: Mon, 4 Jun 2018 17:28:25 -0400 Subject: [PATCH 2/2] add toast for bad query --- app/src/components/head-nav/head-nav.ts | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/app/src/components/head-nav/head-nav.ts b/app/src/components/head-nav/head-nav.ts index dfdf998..0da2d68 100644 --- a/app/src/components/head-nav/head-nav.ts +++ b/app/src/components/head-nav/head-nav.ts @@ -6,6 +6,7 @@ import { ApiProvider } from '../../providers/api/api'; import { CurrencyProvider } from '../../providers/currency/currency'; import { ActionSheetController } from 'ionic-angular'; import { PopoverController } from 'ionic-angular'; +import { ToastController } from 'ionic-angular'; import { DenominationComponent } from '../denomination/denomination'; /** @@ -24,7 +25,6 @@ export class HeadNavComponent { public loading: boolean; @Input() public title: string; public q: string; - public badQuery: boolean = false; constructor( private navCtrl: NavController, @@ -32,7 +32,8 @@ export class HeadNavComponent { private api: ApiProvider, public currency: CurrencyProvider, public actionSheetCtrl: ActionSheetController, - public popoverCtrl: PopoverController + public popoverCtrl: PopoverController, + public toastCtrl: ToastController ) { } @@ -93,17 +94,17 @@ export class HeadNavComponent { /* tslint:disable:no-unused-variable */ private reportBadQuery(): void { - this.badQuery = true; - console.log('badQuery', this.badQuery); + this.presentToast(); + } - setTimeout( - function (): void { - this.badQuery = false; - console.log('badQuery', this.badQuery); - }.bind(this), - 2000 - ); - }; + private presentToast(): void { + const toast: any = this.toastCtrl.create({ + message: 'No matching records found!', + duration: 3000, + position: 'top' + }); + toast.present(); + } private resetSearch(): void { this.q = '';