delete amazon utils and token use on amazon service

This commit is contained in:
Gabriel Bazán 2016-08-04 12:44:27 -03:00 committed by Gustavo Maximiliano Cortez
commit 23417fe1b3
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
4 changed files with 5 additions and 27 deletions

View file

@ -5,11 +5,9 @@ angular.module('copayApp.services').factory('amazonService', function($http, $lo
root.setCredentials = function(network) {
if (network == 'testnet') {
credentials.BITPAY_API_URL = window.amazon_sandbox_bitpay_api_url;
credentials.BITPAY_API_TOKEN = window.amazon_sandbox_bitpay_api_token;
credentials.BITPAY_API_URL = "https://test.bitpay.com";
} else {
credentials.BITPAY_API_URL = window.amazon_bitpay_api_url;
credentials.BITPAY_API_TOKEN = window.amazon_bitpay_api_token;
credentials.BITPAY_API_URL = "https://bitpay.com";
};
};
@ -24,7 +22,6 @@ angular.module('copayApp.services').factory('amazonService', function($http, $lo
};
var _postBitPay = function(endpoint, data) {
data.token = credentials.BITPAY_API_TOKEN;
return {
method: 'POST',
url: credentials.BITPAY_API_URL + endpoint,