From e5734cf0833a9773307d1e31ccd6ee5f5558009f Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 24 May 2018 11:54:58 -0700 Subject: [PATCH] Wallet balance display on the Receive tab now adheres to the Price Display setting. --- src/js/controllers/tab-receive.js | 6 ++++++ www/views/tab-receive.html | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/js/controllers/tab-receive.js b/src/js/controllers/tab-receive.js index 1eef60954..de5f53abb 100644 --- a/src/js/controllers/tab-receive.js +++ b/src/js/controllers/tab-receive.js @@ -13,6 +13,8 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi var currentAddressSocket = {}; var paymentSubscriptionObj = { op:"addr_sub" } + $scope.displayBalanceAsFiat = true; + $scope.requestSpecificAmount = function() { $state.go('tabs.paymentRequest.amount', { id: $scope.wallet.credentials.walletId, @@ -211,6 +213,10 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi if ($scope.wallet && walletId == $scope.wallet.id && type == 'NewIncomingTx') $scope.setAddress(true); }) ]; + + configService.whenAvailable(function(config) { + $scope.displayBalanceAsFiat = config.wallet.settings.priceDisplay === 'fiat'; + }); }); $scope.$on("$ionicView.enter", function(event, data) { diff --git a/www/views/tab-receive.html b/www/views/tab-receive.html index d15088e47..23e61b069 100644 --- a/www/views/tab-receive.html +++ b/www/views/tab-receive.html @@ -94,7 +94,8 @@ {{wallet.name || wallet.id}}

- {{wallet.status.totalBalanceStr}} + {{wallet.status.totalBalanceAlternative}} {{wallet.status.alternativeIsoCode}} + {{wallet.status.totalBalanceStr}} [Balance Hidden]