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);
|
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;
|
var vm = this;
|
||||||
|
|
||||||
vm.allowSend = false;
|
vm.allowSend = false;
|
||||||
|
|
@ -231,8 +231,9 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory,
|
||||||
vm.showSendLimitMaxButton = false;
|
vm.showSendLimitMaxButton = false;
|
||||||
vm.canSendAllAvailableFunds = false;
|
vm.canSendAllAvailableFunds = false;
|
||||||
|
|
||||||
|
ongoingProcess.set('connectingShapeshift', true);
|
||||||
shapeshiftService.getMarketData(vm.fromWallet.coin, vm.toWallet.coin, function(data) {
|
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['minAmount'] = vm.minAmount = parseFloat(data.minimum);
|
||||||
vm.thirdParty.data['maxAmount'] = vm.maxAmount = parseFloat(data.maxLimit);
|
vm.thirdParty.data['maxAmount'] = vm.maxAmount = parseFloat(data.maxLimit);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,11 +53,11 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="keypad-container" style="background: #fff; position: absolute; bottom: 0; margin-bottom: 57px; width: 100%;">
|
<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()">
|
<button class="button button-sendmax" ng-click="vm.sendMax()">
|
||||||
<span>
|
<span>
|
||||||
<span ng-if="vm.showSendMaxButton" translate>Use All Available Funds</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 class="available-funds-amount">(<formatted-amount value="{{vm.sendableFunds}}"></formatted-amount>)</span>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue