diff --git a/app/package.json b/app/package.json index bb7407e..00d8da9 100644 --- a/app/package.json +++ b/app/package.json @@ -38,12 +38,10 @@ "devDependencies": { "@angular/cli": "1.1.2", "@ionic/app-scripts": "1.3.7", - "@ionic/cli-plugin-cordova": "1.6.2", - "@ionic/cli-plugin-ionic-angular": "1.4.1", "@types/jasmine": "2.5.41", "@types/node": "7.0.4", "codecov": "2.2.0", - "ionic": "3.9.1", + "ionic": "3.9.2", "jasmine-core": "2.5.2", "jasmine-spec-reporter": "3.2.0", "karma": "1.4.1", diff --git a/app/src/components/latest-transactions/latest-transactions.html b/app/src/components/latest-transactions/latest-transactions.html index 948536e..e9fe1b1 100644 --- a/app/src/components/latest-transactions/latest-transactions.html +++ b/app/src/components/latest-transactions/latest-transactions.html @@ -1,4 +1,25 @@ -
- {{text}} +
+ +
+ +
+ + + + Hash + Value Out + + + + + {{ tx.hash }} + + + {{ currency.getConversion(tx.out) }} + + + + +
diff --git a/app/src/components/latest-transactions/latest-transactions.ts b/app/src/components/latest-transactions/latest-transactions.ts index 4650fff..5b65217 100644 --- a/app/src/components/latest-transactions/latest-transactions.ts +++ b/app/src/components/latest-transactions/latest-transactions.ts @@ -1,6 +1,7 @@ import { Component } from '@angular/core'; // import { Http } from '@angular/http'; // import { ApiProvider } from '../../providers/api/api'; +import { CurrencyProvider } from '../../providers/currency/currency'; /** * Generated class for the LatestTransactionsComponent component. @@ -14,15 +15,23 @@ import { Component } from '@angular/core'; }) export class LatestTransactionsComponent { - private text: string; + // private loading: boolean = true; + private transactions: Array = [ + { + hash: '12345', + out: 0.001 + }, + { + hash: '22345', + out: 0.002 + } + ]; - constructor(/*private http: Http, private api: ApiProvider*/) { - console.log('Hello LatestTransactionsComponent Component'); - this.text = 'Hello Latest Transactions'; + constructor(/*private http: Http, private api: ApiProvider*/ public currency: CurrencyProvider) { + + // let url: string = this.api.apiPrefix + 'txs'; /* - let url: string = this.api.apiPrefix + 'txs?' + this.queryType + '=' + this.queryValue; - this.http.get(url).subscribe( (data) => { this.transactions = JSON.parse(data['_body']); @@ -49,4 +58,8 @@ export class LatestTransactionsComponent { */ } + public getTransactions(): Array { + return this.transactions; + } + }