diff --git a/app/src/components/transaction-list/transaction-list.ts b/app/src/components/transaction-list/transaction-list.ts index cd7b235..a5d1e64 100644 --- a/app/src/components/transaction-list/transaction-list.ts +++ b/app/src/components/transaction-list/transaction-list.ts @@ -30,10 +30,6 @@ export class TransactionListComponent { (data) => { this.transactions = JSON.parse(data['_body']); this.loading = false; - - this.transactions.txs.forEach((tx) => { - console.log('tx is', tx); - }); }, (err) => { console.log('err is', err); diff --git a/app/src/pages/blocksPage/blocksPage.ts b/app/src/pages/blocksPage/blocksPage.ts index 4d5bd44..3f75c0b 100644 --- a/app/src/pages/blocksPage/blocksPage.ts +++ b/app/src/pages/blocksPage/blocksPage.ts @@ -37,16 +37,24 @@ export class BlocksPage { }, () => { this.http.get(apiPrefix + 'tx/' + this.q).subscribe( - (data: any) => { + function (data: any) { this.resetSearch(); console.log('tx', data); - }, + let parsedData: any = JSON.parse(data._body); + this.navCtrl.push('transaction', { + 'txId': parsedData.txid + }); + }.bind(this), () => { this.http.get(apiPrefix + 'addr/' + this.q).subscribe( - (data: any) => { + function (data: any) { this.resetSearch(); console.log('addr', data); - }, + let parsedData: any = JSON.parse(data._body); + this.navCtrl.push('address', { + 'addrStr': parsedData.addrStr + }); + }.bind(this), () => { this.http.get(apiPrefix + 'block-index/' + this.q).subscribe( function (data: any): void {