Merged cleanup for formated amount.

# Conflicts:
#	src/js/directives/formattedAmount.js
This commit is contained in:
Brendon Duncan 2018-08-09 07:58:24 +12:00
commit cb398a0f50

View file

@ -11,7 +11,7 @@
* @example <formatted-amount value="fee.value" currency="fee.currency" size-equal="true"></formatted-amount>
*/
angular.module('bitcoincom.directives')
.directive('formattedAmount', function(configService, uxLanguage) {
.directive('formattedAmount', function(uxLanguage) {
return {
restrict: 'E',
scope: {
@ -25,8 +25,6 @@ angular.module('bitcoincom.directives')
$scope.displaySizeEqual = !!$scope.sizeEqual;
configService.whenAvailable(function onConfigServiceAvailable(config) {
$timeout(function onFormattedAmountTimeout() {
var decimalPlaces = {
@ -63,7 +61,7 @@ angular.module('bitcoincom.directives')
};
var formatNumbers = function() {
console.log('formatNumbers("' + $scope.value + '", "' + $scope.currency + '")');
// During watch, may be changed from having a separate currency value,
// to both being in value. Don't want to use previous currency value.
// Try to extract currency from value..
@ -130,7 +128,6 @@ angular.module('bitcoincom.directives')
formatNumbers();
});
});
});
}
};
}