show alternative amount on txps
This commit is contained in:
parent
9db19422e4
commit
377dc7a176
2 changed files with 5 additions and 11 deletions
|
|
@ -24,8 +24,6 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
$scope.isRateAvailable = false;
|
$scope.isRateAvailable = false;
|
||||||
$scope.rateService = rateService;
|
$scope.rateService = rateService;
|
||||||
|
|
||||||
$scope.alternativeCurrency = [];
|
|
||||||
|
|
||||||
|
|
||||||
rateService.whenAvailable(function() {
|
rateService.whenAvailable(function() {
|
||||||
$scope.isRateAvailable = true;
|
$scope.isRateAvailable = true;
|
||||||
|
|
@ -89,15 +87,6 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
return w && _.keys(w.addressBook).length > 0;
|
return w && _.keys(w.addressBook).length > 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.amountAlternative = function(amount, txIndex, cb) {
|
|
||||||
var w = $rootScope.wallet;
|
|
||||||
rateService.whenAvailable(function() {
|
|
||||||
var valueSat = amount * w.settings.unitToSatoshi;
|
|
||||||
$scope.alternativeCurrency[txIndex] = rateService.toFiat(valueSat, w.settings.alternativeIsoCode);
|
|
||||||
return cb ? cb() : null;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
if ($rootScope.pendingPayment) {
|
if ($rootScope.pendingPayment) {
|
||||||
var pp = $rootScope.pendingPayment;
|
var pp = $rootScope.pendingPayment;
|
||||||
$scope.address = pp.address + '';
|
$scope.address = pp.address + '';
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,11 @@
|
||||||
<div class="large-3 medium-3 small-4 columns">
|
<div class="large-3 medium-3 small-4 columns">
|
||||||
<div class="size-12">
|
<div class="size-12">
|
||||||
<span>{{out.value |noFractionNumber}} {{$root.wallet.settings.unitName}}</span>
|
<span>{{out.value |noFractionNumber}} {{$root.wallet.settings.unitName}}</span>
|
||||||
|
<span>{{out.alternativeAmount|noFractionNumber}} {{out.alternativeIsoCode}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="size-12 show-for-small-only">
|
||||||
|
<span>{{out.value |noFractionNumber}} {{$root.wallet.settings.unitName}}</span>
|
||||||
|
<span>{{out.alternativeAmount|noFractionNumber}} {{out.alternativeIsoCode}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="large-1 medium-1 small-1 columns fi-arrow-right"></div>
|
<div class="large-1 medium-1 small-1 columns fi-arrow-right"></div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue