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) {
|
$scope.setAlternativeAmount = function(w, tx, cb) {
|
||||||
rateService.whenAvailable(function() {
|
rateService.whenAvailable(function() {
|
||||||
_.each(tx.outs, function(out) {
|
_.each(tx.outs, function(out) {
|
||||||
var valueSat = out.value * w.settings.unitToSatoshi;
|
var valueSat = out.valueSat * w.settings.unitToSatoshi;
|
||||||
out.alternativeAmount = rateService.toFiat(valueSat, $scope.alternativeIsoCode);
|
out.alternativeAmount = $filter('noFractionNumber')(rateService.toFiat(valueSat, $scope.alternativeIsoCode));
|
||||||
out.alternativeIsoCode = $scope.alternativeIsoCode;
|
out.alternativeIsoCode = $scope.alternativeIsoCode;
|
||||||
});
|
});
|
||||||
if (cb) return cb(tx);
|
if (cb) return cb(tx);
|
||||||
|
@ -56,6 +56,7 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
}
|
}
|
||||||
if (tx.outs) {
|
if (tx.outs) {
|
||||||
_.each(tx.outs, function(out) {
|
_.each(tx.outs, function(out) {
|
||||||
|
out.valueSat = out.value;
|
||||||
out.value = $filter('noFractionNumber')(out.value);
|
out.value = $filter('noFractionNumber')(out.value);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
'green' : btx.action == 'received',
|
'green' : btx.action == 'received',
|
||||||
'red': btx.action == 'sent',
|
'red': btx.action == 'sent',
|
||||||
'gray': btx.action == 'moved'}" ng-show="btx.alternativeAmount != null">
|
'gray': btx.action == 'moved'}" ng-show="btx.alternativeAmount != null">
|
||||||
{{btx.alternativeAmount| noFractionNumber}} {{$root.wallet.settings.alternativeIsoCode}}
|
{{btx.alternativeAmount}} {{$root.wallet.settings.alternativeIsoCode}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue