refactor bitpay card

This commit is contained in:
Matias Alejo Garcia 2017-01-27 17:54:41 -03:00
commit 19b3d9bb15
No known key found for this signature in database
GPG key ID: 02470DB551277AB3
11 changed files with 242 additions and 261 deletions

View file

@ -285,7 +285,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
};
var bitpayCardCache = function() {
bitpayCardService.getBitpayDebitCards(function(err, data) {
bitpayCardService.getCards(function(err, data) {
if (err) return;
if (lodash.isEmpty(data)) {
$scope.bitpayCards = null;
@ -296,14 +296,16 @@ angular.module('copayApp.controllers').controller('tabHomeController',
$scope.$digest();
}, 100);
});
bitpayCardService.getBitpayDebitCardsHistory(null, function(err, data) {
if (err) return;
if (lodash.isEmpty(data)) {
$scope.cardsHistory = null;
return;
}
$scope.cardsHistory = data;
});
// TODO
// bitpayCardService.getCardsHistoryCache(function(err, data) {
// if (err) return;
// if (lodash.isEmpty(data)) {
// $scope.cardsHistory = null;
// return;
// }
// $scope.cardsHistory = data;
// });
};
$scope.onRefresh = function() {