Caching txs
This commit is contained in:
parent
c223de2c63
commit
48e921e7df
5 changed files with 59 additions and 34 deletions
|
|
@ -1,10 +1,12 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('buyGlideraController', function($scope, $log, $state, $timeout, $ionicHistory, lodash, glideraService, popupService, profileService, ongoingProcess, walletService) {
|
||||
angular.module('copayApp.controllers').controller('buyGlideraController', function($scope, $log, $state, $timeout, $ionicHistory, lodash, glideraService, popupService, profileService, ongoingProcess, walletService, platformInfo) {
|
||||
|
||||
var amount;
|
||||
var currency;
|
||||
|
||||
$scope.isCordova = platformInfo.isCordova;
|
||||
|
||||
var showErrorAndBack = function(err) {
|
||||
$scope.sendStatus = '';
|
||||
$log.error(err);
|
||||
|
|
|
|||
|
|
@ -13,14 +13,7 @@ angular.module('copayApp.controllers').controller('glideraController',
|
|||
|
||||
$scope.account['token'] = data.token;
|
||||
$scope.account['status'] = data.status;
|
||||
$scope.account['price'] = {};
|
||||
|
||||
glideraService.buyPrice($scope.account.token, {qty: 1}, function(err, buy) {
|
||||
$scope.account.price['buy'] = buy.price;
|
||||
});
|
||||
glideraService.sellPrice($scope.account.token, {qty: 1}, function(err, sell) {
|
||||
$scope.account.price['sell'] = sell.price;
|
||||
});
|
||||
$scope.account['txs'] = data.txs;
|
||||
|
||||
$timeout(function() {
|
||||
$scope.$digest();
|
||||
|
|
@ -46,6 +39,8 @@ angular.module('copayApp.controllers').controller('glideraController',
|
|||
popupService.showAlert('Authorisation error', err);
|
||||
return;
|
||||
}
|
||||
$scope.account['token'] = data.token;
|
||||
$scope.account['status'] = data.status;
|
||||
init();
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('sellGlideraController', function($scope, $log, $state, $timeout, $ionicHistory, lodash, glideraService, popupService, profileService, ongoingProcess, walletService, configService) {
|
||||
angular.module('copayApp.controllers').controller('sellGlideraController', function($scope, $log, $state, $timeout, $ionicHistory, lodash, glideraService, popupService, profileService, ongoingProcess, walletService, configService, platformInfo) {
|
||||
|
||||
var amount;
|
||||
var currency;
|
||||
|
||||
$scope.isCordova = platformInfo.isCordova;
|
||||
|
||||
var showErrorAndBack = function(err) {
|
||||
$scope.sendStatus = '';
|
||||
$log.error(err);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue