show fiat balance when sweeping private key
This commit is contained in:
parent
223d196183
commit
85cf86d108
2 changed files with 17 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('copayApp.controllers').controller('paperWalletController',
|
||||
function($scope, $timeout, $log, $ionicModal, $ionicHistory, feeService, popupService, gettextCatalog, platformInfo, configService, profileService, $state, lodash, bitcore, bitcoreCash, ongoingProcess, txFormatService, $stateParams, walletService) {
|
||||
function($scope, $timeout, $log, $ionicModal, $ionicHistory, feeService, popupService, gettextCatalog, platformInfo, configService, profileService, $state, lodash, bitcore, bitcoreCash, ongoingProcess, txFormatService, $stateParams, walletService, rateService) {
|
||||
|
||||
var _ = lodash;
|
||||
|
||||
|
|
@ -71,10 +71,15 @@ angular.module('copayApp.controllers').controller('paperWalletController',
|
|||
$scope.btcBalance = btcBalance;
|
||||
$scope.bchBalance = bchBalance;
|
||||
|
||||
if ($scope.btcWallet)
|
||||
if ($scope.btcWallet) {
|
||||
$scope.btcBalanceText = txFormatService.formatAmountStr($scope.btcWallet.coin, btcBalance);
|
||||
if ($scope.bchWallet)
|
||||
$scope.btcFiatBalance = rateService.toFiat(btcBalance, $scope.fiatCode, 'btc').toFixed(2);
|
||||
}
|
||||
|
||||
if ($scope.bchWallet) {
|
||||
$scope.bchBalanceText = txFormatService.formatAmountStr($scope.bchWallet.coin, bchBalance);
|
||||
$scope.bchFiatBalance = rateService.toFiat(bchBalance, $scope.fiatCode, 'bch').toFixed(2);
|
||||
}
|
||||
|
||||
$scope.readyToShow = true;
|
||||
}
|
||||
|
|
@ -170,6 +175,9 @@ angular.module('copayApp.controllers').controller('paperWalletController',
|
|||
$scope.singleBchWallet = $scope.bchWallets.length == 1;
|
||||
$scope.noMatchingBtcWallet = $scope.btcWallets.length == 0;
|
||||
$scope.noMatchingBchWallet = $scope.bchWallets.length == 0;
|
||||
|
||||
var config = configService.getSync().wallet.settings;
|
||||
$scope.fiatCode = config.alternativeIsoCode || 'USD';
|
||||
});
|
||||
|
||||
$scope.$on("$ionicView.enter", function(event, data) {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@
|
|||
<h4 class="text-bold" translate>Bitcoin Cash found:</h4>
|
||||
<div class="size-24">
|
||||
<span>{{bchBalanceText}}</span>
|
||||
<div class="size-14 amount-alternative">
|
||||
{{bchFiatBalance}} {{fiatCode}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -57,6 +60,9 @@
|
|||
<h4 class="text-bold" translate>Bitcoin found:</h4>
|
||||
<div class="size-24">
|
||||
<span>{{btcBalanceText}}</span>
|
||||
<div class="size-14 amount-alternative">
|
||||
{{btcFiatBalance}} {{fiatCode}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue