added call to new txs endpoint; changed html to reflect txid and valueOut in transactions grid
This commit is contained in:
parent
b9de71862d
commit
9848b17fc1
@ -11,12 +11,12 @@
|
|||||||
<ion-col text-right><b>Value Out</b></ion-col>
|
<ion-col text-right><b>Value Out</b></ion-col>
|
||||||
</ion-row>
|
</ion-row>
|
||||||
|
|
||||||
<ion-row *ngFor="let tx of getTransactions()">
|
<ion-row *ngFor="let tx of transactions">
|
||||||
<ion-col>
|
<ion-col>
|
||||||
<a (click)="goToTransaction(tx.hash)">{{ tx.hash }}</a>
|
<a (click)="goToTx(tx.txid)">{{ tx.txid }}</a>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
<ion-col text-right>
|
<ion-col text-right>
|
||||||
{{ currency.getConversion(tx.out) }}
|
{{ currency.getConversion(tx.valueOut) }}
|
||||||
</ion-col>
|
</ion-col>
|
||||||
</ion-row>
|
</ion-row>
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { Http } from '@angular/http';
|
import { Http } from '@angular/http';
|
||||||
|
import { NavController } from 'ionic-angular';
|
||||||
import { ApiProvider } from '../../providers/api/api';
|
import { ApiProvider } from '../../providers/api/api';
|
||||||
import { CurrencyProvider } from '../../providers/currency/currency';
|
import { CurrencyProvider } from '../../providers/currency/currency';
|
||||||
|
|
||||||
@ -18,7 +19,7 @@ export class LatestTransactionsComponent {
|
|||||||
private loading: boolean = true;
|
private loading: boolean = true;
|
||||||
private transactions: Array<any> = [];
|
private transactions: Array<any> = [];
|
||||||
|
|
||||||
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';
|
let url: string = this.api.apiPrefix + 'txs';
|
||||||
|
|
||||||
@ -35,8 +36,9 @@ export class LatestTransactionsComponent {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getTransactions(): Array<any> {
|
public goToTx(txId: string): void {
|
||||||
return this.transactions;
|
this.navCtrl.push('transaction', {
|
||||||
|
'txId': txId
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user