Enter Amount displaying ongoing progress indicator when contacting Shapeshift. Send max button now displays max limit amount when available funds are above the Shapeshift limit.
This commit is contained in:
parent
b2178c84e3
commit
4dc3e7c2e8
2 changed files with 7 additions and 6 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
angular.module('copayApp.controllers').controller('amountController', amountController);
|
||||
|
||||
function amountController(configService, $filter, gettextCatalog, $ionicHistory, $ionicModal, $ionicScrollDelegate, lodash, $log, nodeWebkitService, rateService, $scope, $state, $timeout, sendFlowService, shapeshiftService, txFormatService, platformInfo, profileService, walletService, $window) {
|
||||
function amountController(configService, $filter, gettextCatalog, $ionicHistory, $ionicModal, $ionicScrollDelegate, lodash, $log, nodeWebkitService, rateService, $scope, $state, $timeout, sendFlowService, shapeshiftService, txFormatService, platformInfo, ongoingProcess, profileService, walletService, $window) {
|
||||
var vm = this;
|
||||
|
||||
vm.allowSend = false;
|
||||
|
|
@ -231,8 +231,9 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory,
|
|||
vm.showSendLimitMaxButton = false;
|
||||
vm.canSendAllAvailableFunds = false;
|
||||
|
||||
|
||||
shapeshiftService.getMarketData(vm.fromWallet.coin, vm.toWallet.coin, function(data) {
|
||||
ongoingProcess.set('connectingShapeshift', true);
|
||||
shapeshiftService.getMarketData(vm.fromWallet.coin, vm.toWallet.coin, function onMarketData(data) {
|
||||
ongoingProcess.set('connectingShapeshift', false);
|
||||
vm.thirdParty.data['minAmount'] = vm.minAmount = parseFloat(data.minimum);
|
||||
vm.thirdParty.data['maxAmount'] = vm.maxAmount = parseFloat(data.maxLimit);
|
||||
|
||||
|
|
@ -740,7 +741,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory,
|
|||
console.log('sendmax Setting max button text');
|
||||
transactionSendableAmount.crypto = txFormatService.formatAmountStr(wallet.coin, transactionSendableAmount.satoshis);
|
||||
vm.sendableFunds = transactionSendableAmount.crypto;
|
||||
|
||||
|
||||
if (availableUnits[unitIndex].isFiat) {
|
||||
txFormatService.formatAlternativeStr(wallet.coin, transactionSendableAmount.satoshis, function onFormat(formatted){
|
||||
if (formatted) {
|
||||
|
|
|
|||
|
|
@ -53,11 +53,11 @@
|
|||
</div>
|
||||
|
||||
<div class="keypad-container" style="background: #fff; position: absolute; bottom: 0; margin-bottom: 57px; width: 100%;">
|
||||
<div class="sendmax" ng-if="vm.showSendMaxButton || vm.showSendMaxLimitButton">
|
||||
<div class="sendmax" ng-if="vm.showSendMaxButton || vm.showSendLimitMaxButton">
|
||||
<button class="button button-sendmax" ng-click="vm.sendMax()">
|
||||
<span>
|
||||
<span ng-if="vm.showSendMaxButton" translate>Use All Available Funds</span>
|
||||
<span ng-if="vm.showSendMaxLimitButton" translate>Send Maximum Amount</span> 
|
||||
<span ng-if="vm.showSendLimitMaxButton" translate>Send Maximum Amount</span> 
|
||||
<span class="available-funds-amount">(<formatted-amount value="{{vm.sendableFunds}}"></formatted-amount>)</span>
|
||||
</span>
|
||||
</button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue