mirror of https://github.com/BTCPrivate/copay.git
delete amazon utils and token use on amazon service
This commit is contained in:
parent
2cb099057e
commit
23417fe1b3
|
@ -1691,8 +1691,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
|
|
||||||
var config = configService.getSync();
|
var config = configService.getSync();
|
||||||
|
|
||||||
$scope.color = config.colorFor[txp.walletId];
|
$scope.color = config.colorFor[txp.walletId] || '#4A90E2';
|
||||||
$scope.tx = txFormatService.processTx(txp);
|
$scope.tx = txFormatService.processTx(txp);
|
||||||
|
|
||||||
self.confirmationPopup = $ionicPopup.show({
|
self.confirmationPopup = $ionicPopup.show({
|
||||||
templateUrl: 'views/includes/confirm-tx.html',
|
templateUrl: 'views/includes/confirm-tx.html',
|
||||||
scope: $scope,
|
scope: $scope,
|
||||||
|
|
|
@ -5,11 +5,9 @@ angular.module('copayApp.services').factory('amazonService', function($http, $lo
|
||||||
|
|
||||||
root.setCredentials = function(network) {
|
root.setCredentials = function(network) {
|
||||||
if (network == 'testnet') {
|
if (network == 'testnet') {
|
||||||
credentials.BITPAY_API_URL = window.amazon_sandbox_bitpay_api_url;
|
credentials.BITPAY_API_URL = "https://test.bitpay.com";
|
||||||
credentials.BITPAY_API_TOKEN = window.amazon_sandbox_bitpay_api_token;
|
|
||||||
} else {
|
} else {
|
||||||
credentials.BITPAY_API_URL = window.amazon_bitpay_api_url;
|
credentials.BITPAY_API_URL = "https://bitpay.com";
|
||||||
credentials.BITPAY_API_TOKEN = window.amazon_bitpay_api_token;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -24,7 +22,6 @@ angular.module('copayApp.services').factory('amazonService', function($http, $lo
|
||||||
};
|
};
|
||||||
|
|
||||||
var _postBitPay = function(endpoint, data) {
|
var _postBitPay = function(endpoint, data) {
|
||||||
data.token = credentials.BITPAY_API_TOKEN;
|
|
||||||
return {
|
return {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: credentials.BITPAY_API_URL + endpoint,
|
url: credentials.BITPAY_API_URL + endpoint,
|
||||||
|
|
|
@ -127,7 +127,7 @@ angular.module('copayApp.services').factory('configService', function(storageSer
|
||||||
|
|
||||||
// Amazon
|
// Amazon
|
||||||
// Disabled for testnet
|
// Disabled for testnet
|
||||||
configCache.amazon.testnet = true;
|
configCache.amazon.testnet = false;
|
||||||
|
|
||||||
$log.debug('Preferences read:', configCache)
|
$log.debug('Preferences read:', configCache)
|
||||||
return cb(err, configCache);
|
return cb(err, configCache);
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
#!/usr/bin/env node
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var fs = require('fs');
|
|
||||||
var file;
|
|
||||||
|
|
||||||
try {
|
|
||||||
file = fs.readFileSync('./amazon.json', 'utf8');
|
|
||||||
} catch (err) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var json = JSON.parse(file);
|
|
||||||
|
|
||||||
var content = '\nwindow.amazon_sandbox_bitpay_api_token="' + json.sandbox.bitpay_api_token + '";';
|
|
||||||
content = content + '\nwindow.amazon_sandbox_bitpay_api_url="' + json.sandbox.bitpay_api_url + '";';
|
|
||||||
content = content + '\nwindow.amazon_bitpay_api_token="' + json.production.bitpay_api_token + '";';
|
|
||||||
content = content + '\nwindow.amazon_bitpay_api_url="' + json.production.bitpay_api_url + '";';
|
|
||||||
fs.writeFileSync("./src/js/amazon.js", content);
|
|
Loading…
Reference in New Issue