mirror of https://github.com/BTCPrivate/copay.git
applied noFraction filter in controller
This commit is contained in:
parent
72cc5a1a28
commit
9628bbd222
|
@ -33,8 +33,8 @@ angular.module('copayApp.controllers').controller('SendController',
|
|||
$scope.setAlternativeAmount = function(w, tx, cb) {
|
||||
rateService.whenAvailable(function() {
|
||||
_.each(tx.outs, function(out) {
|
||||
var valueSat = out.value * w.settings.unitToSatoshi;
|
||||
out.alternativeAmount = rateService.toFiat(valueSat, $scope.alternativeIsoCode);
|
||||
var valueSat = out.valueSat * w.settings.unitToSatoshi;
|
||||
out.alternativeAmount = $filter('noFractionNumber')(rateService.toFiat(valueSat, $scope.alternativeIsoCode));
|
||||
out.alternativeIsoCode = $scope.alternativeIsoCode;
|
||||
});
|
||||
if (cb) return cb(tx);
|
||||
|
@ -56,6 +56,7 @@ angular.module('copayApp.controllers').controller('SendController',
|
|||
}
|
||||
if (tx.outs) {
|
||||
_.each(tx.outs, function(out) {
|
||||
out.valueSat = out.value;
|
||||
out.value = $filter('noFractionNumber')(out.value);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
'green' : btx.action == 'received',
|
||||
'red': btx.action == 'sent',
|
||||
'gray': btx.action == 'moved'}" ng-show="btx.alternativeAmount != null">
|
||||
{{btx.alternativeAmount| noFractionNumber}} {{$root.wallet.settings.alternativeIsoCode}}
|
||||
{{btx.alternativeAmount}} {{$root.wallet.settings.alternativeIsoCode}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue