Colors top-up icon green or pending.

This commit is contained in:
Andy Phillipson 2017-06-07 18:55:43 -04:00
commit 59edea271b
No known key found for this signature in database
GPG key ID: D813A67D567D6C88
7 changed files with 125 additions and 58 deletions

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('bitpayCardController', function($scope, $timeout, $log, $state, lodash, bitpayCardService, moment, popupService, gettextCatalog, $ionicHistory, bitpayService, externalLinkService) {
angular.module('copayApp.controllers').controller('bitpayCardController', function($scope, $timeout, $log, $state, lodash, bitpayCardService, moment, popupService, gettextCatalog, $ionicHistory, bitpayService, externalLinkService, timeService) {
var self = this;
var runningBalance;
@ -163,6 +163,14 @@ angular.module('copayApp.controllers').controller('bitpayCardController', functi
runningBalance -= parseFloat(tx.amount);
};
this.withinPastDay = function(tx) {
var result = false;
if (tx.timestamp) {
result = timeService.withinPastDay(tx.timestamp);
}
return result;
};
this.openExternalLink = function(url) {
var optIn = true;
var title = null;