From 3bc5959075516234d897a849d4047816f64f9c3f Mon Sep 17 00:00:00 2001 From: Darren Nelsen Date: Thu, 10 Aug 2017 17:44:51 -0400 Subject: [PATCH] Added currency conversion to transaction component --- app/src/components/transaction/transaction.html | 8 ++++---- app/src/components/transaction/transaction.ts | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/src/components/transaction/transaction.html b/app/src/components/transaction/transaction.html index 39020c5..75cc9b4 100644 --- a/app/src/components/transaction/transaction.html +++ b/app/src/components/transaction/transaction.html @@ -29,7 +29,7 @@
-

{{ vin.addr }} {{ vin.value + ' BTC' }}

+

{{ vin.addr }} {{ currency.getConversion(vin.value) }}

Confirmations {{vin.confirmations}}

scriptSig

@@ -62,7 +62,7 @@
- {{ vout.value + ' BTC' }} + {{ currency.getConversion(vout.value) }} (S) (U)
@@ -73,11 +73,11 @@ - Fee {{ tx.fees + ' BTC' }} + Fee {{ currency.getConversion(tx.fees) }} {{ tx.confirmations }} Confirmations - {{ tx.valueOut + ' BTC' }} + {{ currency.getConversion(tx.valueOut) }} diff --git a/app/src/components/transaction/transaction.ts b/app/src/components/transaction/transaction.ts index 074ee97..b01a7bb 100644 --- a/app/src/components/transaction/transaction.ts +++ b/app/src/components/transaction/transaction.ts @@ -1,6 +1,7 @@ import { Component } from '@angular/core'; import { Input } from '@angular/core'; import { NavController } from 'ionic-angular'; +import { CurrencyProvider } from '../../providers/currency/currency'; /** * Generated class for the TransactionComponent component. @@ -17,7 +18,7 @@ export class TransactionComponent { public expanded: boolean = false; @Input() public tx: any = {}; - constructor(private navCtrl: NavController) { + constructor(private navCtrl: NavController, public currency: CurrencyProvider) { } public getAddress(vout: any): string {