Refining the display of available funds.
This commit is contained in:
parent
d5666c9d29
commit
f0ccee8a0a
3 changed files with 11 additions and 5 deletions
|
|
@ -316,6 +316,7 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i
|
|||
});
|
||||
}
|
||||
|
||||
updateAvailableFundsStringIfNeeded();
|
||||
updateUnitUI();
|
||||
};
|
||||
|
||||
|
|
@ -663,18 +664,21 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i
|
|||
availableUnits[altUnitIndex].name = newAltCurrency.isoCode;
|
||||
availableUnits[altUnitIndex].shortName = newAltCurrency.isoCode;
|
||||
fiatCode = newAltCurrency.isoCode;
|
||||
updateAvailableFiatIfNeeded();
|
||||
updateAvailableFundsStringIfNeeded();
|
||||
updateUnitUI();
|
||||
close();
|
||||
});
|
||||
};
|
||||
|
||||
function updateAvailableFiatIfNeeded() {
|
||||
function updateAvailableFundsStringIfNeeded() {
|
||||
console.log('updateAvailableFundsStringIfNeeded()');
|
||||
if (vm.fromWalletId && availableSatoshis !== null) {
|
||||
console.log('updating');
|
||||
availableFundsInFiat = '';
|
||||
vm.availableFunds = availableFundsInCrypto;
|
||||
var coin = availableUnits[altUnitIndex].isFiat ? availableUnits[unitIndex].id : availableUnits[altUnitIndex].id;
|
||||
txFormatService.formatAlternativeStr(coin, availableSatoshis, function formatCallback(formatted){
|
||||
console.log('txFormatService returned');
|
||||
if (formatted) {
|
||||
availableFundsInFiat = formatted;
|
||||
if (availableUnits[unitIndex].isFiat) {
|
||||
|
|
|
|||
|
|
@ -387,7 +387,7 @@
|
|||
|
||||
.extra,
|
||||
button.extra {
|
||||
display: flex;
|
||||
/*display: flex;*/
|
||||
flex: 0 1 auto;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,8 +44,10 @@
|
|||
<span translate>Change Currency</span>
|
||||
</span>
|
||||
</button>
|
||||
<div class="extra available-funds" ng-class="{warning: vm.fundsAreInsufficient}" translate>
|
||||
Available Funds: {{vm.availableFunds}}</span>
|
||||
<div class="extra available-funds"
|
||||
ng-class="{warning: vm.fundsAreInsufficient}"
|
||||
ng-if="!vm.isRequestingSpecificAmount" translate>
|
||||
<span>Available Funds:</span> <span>{{vm.availableFunds}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue