WIP - re-factor debit card to create a reusable bitpayService.

This commit is contained in:
Andy Phillipson 2016-12-23 11:37:19 -05:00
commit 4a6499d528
6 changed files with 464 additions and 169 deletions

View file

@ -1,13 +1,13 @@
'use strict';
angular.module('copayApp.controllers').controller('bitpayCardController', function($scope, $timeout, $log, $state, lodash, bitpayCardService, moment, popupService, gettextCatalog, $ionicHistory) {
angular.module('copayApp.controllers').controller('bitpayCardController', function($scope, $timeout, $log, $state, lodash, bitpayCardService, moment, popupService, gettextCatalog, $ionicHistory, bitpayService) {
var self = this;
var runningBalance;
$scope.dateRange = {
value: 'last30Days'
};
$scope.network = bitpayCardService.getEnvironment();
$scope.network = bitpayService.getEnvironment();
var updateHistoryFromCache = function(cb) {
bitpayCardService.getBitpayDebitCardsHistory($scope.cardId, function(err, data) {