Available funds now accurately reflects the primary currency choice.
This commit is contained in:
parent
0fdd478ae4
commit
71a31ce399
1 changed files with 8 additions and 8 deletions
|
|
@ -671,21 +671,21 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i
|
||||||
};
|
};
|
||||||
|
|
||||||
function updateAvailableFundsStringIfNeeded() {
|
function updateAvailableFundsStringIfNeeded() {
|
||||||
console.log('updateAvailableFundsStringIfNeeded()');
|
|
||||||
if (vm.fromWalletId && availableSatoshis !== null) {
|
if (vm.fromWalletId && availableSatoshis !== null) {
|
||||||
console.log('updating');
|
|
||||||
availableFundsInFiat = '';
|
availableFundsInFiat = '';
|
||||||
vm.availableFunds = availableFundsInCrypto;
|
vm.availableFunds = availableFundsInCrypto;
|
||||||
var coin = availableUnits[altUnitIndex].isFiat ? availableUnits[unitIndex].id : availableUnits[altUnitIndex].id;
|
var coin = availableUnits[altUnitIndex].isFiat ? availableUnits[unitIndex].id : availableUnits[altUnitIndex].id;
|
||||||
txFormatService.formatAlternativeStr(coin, availableSatoshis, function formatCallback(formatted){
|
txFormatService.formatAlternativeStr(coin, availableSatoshis, function formatCallback(formatted){
|
||||||
console.log('txFormatService returned');
|
|
||||||
if (formatted) {
|
if (formatted) {
|
||||||
availableFundsInFiat = formatted;
|
availableFundsInFiat = formatted;
|
||||||
if (availableUnits[unitIndex].isFiat) {
|
|
||||||
vm.availableFunds = availableFundsInFiat;
|
$scope.$apply(function() {
|
||||||
} else {
|
if (availableUnits[unitIndex].isFiat) {
|
||||||
vm.availableFunds = availableFundsInCrypto;
|
vm.availableFunds = availableFundsInFiat;
|
||||||
}
|
} else {
|
||||||
|
vm.availableFunds = availableFundsInCrypto;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue