Merge pull request #254 from Bitcoin-com/wallet/task/427

Fix decimal
This commit is contained in:
Jean-Baptiste Dominguez 2018-08-09 23:30:23 +09:00 committed by GitHub
commit 06a56cab4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,16 +31,13 @@
$scope.displaySizeEqual = !!$scope.sizeEqual; $scope.displaySizeEqual = !!$scope.sizeEqual;
$timeout(function onFormattedAmountTimeout() {
var decimalPlaces = { var decimalPlaces = {
'0': ['BIF', 'CLP', 'DJF', 'GNF', 'ILS', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'UGX', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'], '0': ['BIF', 'CLP', 'DJF', 'GNF', 'ILS', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'UGX', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'],
'3': ['BHD', 'IQD', 'JOD', 'KWD', 'OMR', 'TND'], '3': ['BHD', 'IQD', 'JOD', 'KWD', 'OMR', 'TND'],
'8': ['BCH', 'BTC'] '8': ['BCH', 'BTC']
}; };
formatNumbers(); $scope.$watch('value', function onFormattedAmountWatch() {
$scope.$watchGroup(['currency', 'value'], function onFormattedAmountWatch() {
formatNumbers(); formatNumbers();
}); });
@ -177,8 +174,6 @@
var corrected = ensureEnoughFractionDigits(localized, x, minimumFractionDigits); var corrected = ensureEnoughFractionDigits(localized, x, minimumFractionDigits);
return corrected; return corrected;
}; };
});
} }
})(); })();