From f8f56544aecfe18f16043f2f4c0731f454b4f90e Mon Sep 17 00:00:00 2001 From: Marty Alcala Date: Fri, 21 Oct 2016 17:20:46 -0400 Subject: [PATCH] wire alternative amount --- src/js/controllers/modals/txDetails.js | 46 +++++++++++++------------- www/views/modals/tx-details.html | 4 +-- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/js/controllers/modals/txDetails.js b/src/js/controllers/modals/txDetails.js index 09aa59af8..97d41ca2c 100644 --- a/src/js/controllers/modals/txDetails.js +++ b/src/js/controllers/modals/txDetails.js @@ -35,7 +35,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio updateMemo(); initActionList(); - getAlternativeAmount(); + //getAlternativeAmount(); }; function getDisplayAmount(amountStr) { @@ -138,28 +138,28 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio }); }; - var getAlternativeAmount = function() { - var satToBtc = 1 / 100000000; - - wallet.getFiatRate({ - code: $scope.alternativeIsoCode, - ts: $scope.btx.time * 1000 - }, function(err, res) { - if (err) { - $log.debug('Could not get historic rate'); - return; - } - if (res && res.rate) { - var alternativeAmountBtc = ($scope.btx.amount * satToBtc).toFixed(8); - $scope.rateDate = res.fetchedOn; - $scope.rateStr = res.rate + ' ' + $scope.alternativeIsoCode; - $scope.alternativeAmountStr = $filter('formatFiatAmount')(alternativeAmountBtc * res.rate) + ' ' + $scope.alternativeIsoCode; - $timeout(function() { - $scope.$apply(); - }); - } - }); - }; + // var getAlternativeAmount = function() { + // var satToBtc = 1 / 100000000; + // + // wallet.getFiatRate({ + // code: $scope.alternativeIsoCode, + // ts: $scope.btx.time * 1000 + // }, function(err, res) { + // if (err) { + // $log.debug('Could not get historic rate'); + // return; + // } + // if (res && res.rate) { + // var alternativeAmountBtc = ($scope.btx.amount * satToBtc).toFixed(8); + // $scope.rateDate = res.fetchedOn; + // $scope.rateStr = res.rate + ' ' + $scope.alternativeIsoCode; + // $scope.alternativeAmountStr = $filter('formatFiatAmount')(alternativeAmountBtc * res.rate) + ' ' + $scope.alternativeIsoCode; + // $timeout(function() { + // $scope.$apply(); + // }); + // } + // }); + // }; $scope.openExternalLink = function(url, optIn, title, message, okText, cancelText) { externalLinkService.open(url, optIn, title, message, okText, cancelText); diff --git a/www/views/modals/tx-details.html b/www/views/modals/tx-details.html index 30a882231..cd33631db 100644 --- a/www/views/modals/tx-details.html +++ b/www/views/modals/tx-details.html @@ -7,7 +7,7 @@ - +
@@ -16,7 +16,7 @@
{{displayAmount}} {{displayUnit}}
-
{{alternativeAmountStr}}
+
{{btx.alternativeAmountStr}}