Merge pull request #5295 from JDonadio/fix/format-amount
fix format amount
This commit is contained in:
commit
5a459ad47e
1 changed files with 4 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.services').factory('txFormatService', function(bwcService, rateService, configService, lodash) {
|
angular.module('copayApp.services').factory('txFormatService', function($filter, bwcService, rateService, configService, lodash) {
|
||||||
var root = {};
|
var root = {};
|
||||||
|
|
||||||
root.Utils = bwcService.getUtils();
|
root.Utils = bwcService.getUtils();
|
||||||
|
|
@ -48,10 +48,11 @@ angular.module('copayApp.services').factory('txFormatService', function(bwcServi
|
||||||
var config = configService.getSync().wallet.settings;
|
var config = configService.getSync().wallet.settings;
|
||||||
|
|
||||||
var val = function() {
|
var val = function() {
|
||||||
var v1 = rateService.toFiat(satoshis, config.alternativeIsoCode);
|
var v1 = parseFloat((rateService.toFiat(satoshis, config.alternativeIsoCode)).toFixed(2));
|
||||||
|
v1 = $filter('formatFiatAmount')(v1);
|
||||||
if (!v1) return null;
|
if (!v1) return null;
|
||||||
|
|
||||||
return v1.toFixed(2) + ' ' + config.alternativeIsoCode;
|
return v1 + ' ' + config.alternativeIsoCode;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Async version
|
// Async version
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue