From 6eb585e3d1506ddcf5f22d91f8e1e575fdd6f72f Mon Sep 17 00:00:00 2001 From: JDonadio Date: Mon, 20 Nov 2017 17:12:37 -0300 Subject: [PATCH] ref view logic --- src/pages/send/amount/amount.html | 4 ++-- src/pages/send/amount/amount.ts | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pages/send/amount/amount.html b/src/pages/send/amount/amount.html index 4833148fd..a78f39069 100644 --- a/src/pages/send/amount/amount.html +++ b/src/pages/send/amount/amount.html @@ -39,8 +39,8 @@ {{unit}}
= {{amount | number: '1.2-8'}} {{unit}}
-
≈ {{amount * 1e8 | satToFiat: unit}}
-
≈ {{amount | fiatToUnit}}
+
≈ {{amount | fiatToUnit}}
+
≈ {{amount * 1e8 | satToFiat: unit}}
diff --git a/src/pages/send/amount/amount.ts b/src/pages/send/amount/amount.ts index 091eda20e..99f49d44d 100644 --- a/src/pages/send/amount/amount.ts +++ b/src/pages/send/amount/amount.ts @@ -24,6 +24,7 @@ export class AmountPage { private LENGTH_EXPRESSION_LIMIT: number; private SMALL_FONT_SIZE_LIMIT: number; private availableUnits: Array; + private isFiatAmount: boolean; private unit: string; private reNr: RegExp; private reOp: RegExp; @@ -65,6 +66,7 @@ export class AmountPage { this.SMALL_FONT_SIZE_LIMIT = 10; this.availableUnits = []; this.unit = ''; + this.isFiatAmount = false; this.expression = ''; this.amount = 0; this.showExpressionResult = false; @@ -230,5 +232,6 @@ export class AmountPage { this.availableUnits.slice(0, this.availableUnits.length).join(','); this.availableUnits.push(this.availableUnits.shift()); this.unit = this.availableUnits[0]; + this.isFiatAmount = this.unit != 'BCH' && this.unit != 'BTC' ? true : false; } }