Fix bitpayCard, Amazon, Glidera. Fixes related with NW

This commit is contained in:
Gustavo Maximiliano Cortez 2016-08-24 19:00:50 -03:00
commit 1e9b60aff4
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
13 changed files with 248 additions and 276 deletions

View file

@ -1,15 +1,24 @@
'use strict';
angular.module('copayApp.controllers').controller('amazonController',
function($scope, $timeout, $ionicModal, $log, lodash, bwcError, amazonService, platformInfo) {
function($scope, $timeout, $ionicModal, $log, lodash, bwcError, amazonService, platformInfo, nodeWebkit) {
if (platformInfo.isCordova && StatusBar.isVisible) {
StatusBar.backgroundColorByHexString("#4B6178");
}
$scope.openExternalLink = function(url, target) {
if (platformInfo.isNW) {
nodeWebkit.openExternalLink(url);
} else {
target = target || '_blank';
var ref = window.open(url, target, 'location=no');
}
};
this.init = function() {
var self = this;
self.sandbox = amazonService.getEnvironment() == 'testnet' ? true : false;
$scope.network = amazonService.getEnvironment();
amazonService.getPendingGiftCards(function(err, gcds) {
if (err) {
self.error = err;