From 9848b17fc1e6fd4de7f266d52ac4a437044647ca Mon Sep 17 00:00:00 2001 From: Darren Nelsen Date: Tue, 22 Aug 2017 14:34:24 -0400 Subject: [PATCH] added call to new txs endpoint; changed html to reflect txid and valueOut in transactions grid --- .../latest-transactions/latest-transactions.html | 6 +++--- .../latest-transactions/latest-transactions.ts | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/src/components/latest-transactions/latest-transactions.html b/app/src/components/latest-transactions/latest-transactions.html index e9fe1b1..7fa05ff 100644 --- a/app/src/components/latest-transactions/latest-transactions.html +++ b/app/src/components/latest-transactions/latest-transactions.html @@ -11,12 +11,12 @@ Value Out - + - {{ tx.hash }} + {{ tx.txid }} - {{ currency.getConversion(tx.out) }} + {{ currency.getConversion(tx.valueOut) }} diff --git a/app/src/components/latest-transactions/latest-transactions.ts b/app/src/components/latest-transactions/latest-transactions.ts index 6740f72..536d89a 100644 --- a/app/src/components/latest-transactions/latest-transactions.ts +++ b/app/src/components/latest-transactions/latest-transactions.ts @@ -1,5 +1,6 @@ import { Component } from '@angular/core'; import { Http } from '@angular/http'; +import { NavController } from 'ionic-angular'; import { ApiProvider } from '../../providers/api/api'; import { CurrencyProvider } from '../../providers/currency/currency'; @@ -18,7 +19,7 @@ export class LatestTransactionsComponent { private loading: boolean = true; private transactions: Array = []; - constructor(private http: Http, private api: ApiProvider, public currency: CurrencyProvider) { + constructor(private http: Http, private navCtrl: NavController, private api: ApiProvider, public currency: CurrencyProvider) { let url: string = this.api.apiPrefix + 'txs'; @@ -35,8 +36,9 @@ export class LatestTransactionsComponent { ); } - public getTransactions(): Array { - return this.transactions; + public goToTx(txId: string): void { + this.navCtrl.push('transaction', { + 'txId': txId + }); } - }