From 71bdd845da7ef4c74e1ff74519924e80d9a98209 Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Thu, 29 Mar 2018 14:49:35 +0900 Subject: [PATCH] Update: Utilise txFormatService for payment received overlay --- src/js/controllers/tab-receive.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/controllers/tab-receive.js b/src/js/controllers/tab-receive.js index be761d3fd..8db0ae355 100644 --- a/src/js/controllers/tab-receive.js +++ b/src/js/controllers/tab-receive.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('tabReceiveController', function($rootScope, $scope, $timeout, $log, $ionicModal, $state, $ionicHistory, $ionicPopover, storageService, platformInfo, walletService, profileService, configService, lodash, gettextCatalog, popupService, bwcError, bitcoinCashJsService, $ionicNavBarDelegate) { +angular.module('copayApp.controllers').controller('tabReceiveController', function($rootScope, $scope, $timeout, $log, $ionicModal, $state, $ionicHistory, $ionicPopover, storageService, platformInfo, walletService, profileService, configService, lodash, gettextCatalog, popupService, bwcError, bitcoinCashJsService, $ionicNavBarDelegate, txFormatService) { var listeners = []; $scope.bchAddressType = { type: 'cashaddr' }; @@ -122,7 +122,7 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi var watchAddress = $scope.wallet.coin == 'bch' ? $scope.addrBchLegacy : $scope.addr; for (var i = 0; i < data.x.out.length; i++) { if (data.x.out[i].addr == watchAddress) { - $scope.paymentReceivedAmount = (data.x.out[i].value / 100000000).toFixed(8); + $scope.paymentReceivedAmount = txFormatService.formatAmount(data.x.out[i].value, 'full'); } } $scope.paymentReceivedCoin = $scope.wallet.coin;