Refactor network environment

This commit is contained in:
Gustavo Maximiliano Cortez 2016-08-05 12:59:03 -03:00
commit e466405769
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
4 changed files with 20 additions and 22 deletions

View file

@ -1,13 +1,11 @@
'use strict';
angular.module('copayApp.controllers').controller('amazonController',
function($scope, $timeout, $ionicModal, $log, lodash, bwcError, configService, amazonService) {
function($scope, $timeout, $ionicModal, $log, lodash, bwcError, amazonService) {
this.init = function() {
var self = this;
var network = configService.getSync().amazon.testnet ? 'testnet' : 'livenet';
self.sandbox = network == 'testnet' ? true : false;
amazonService.setCredentials(network);
self.sandbox = amazonService.getEnvironment() == 'testnet' ? true : false;
amazonService.getPendingGiftCards(function(err, gcds) {
if (err) {
self.error = err;