Refactor Amazon integration. Clear amount/confirm views
This commit is contained in:
parent
5bbad38a99
commit
b312e38cbc
17 changed files with 720 additions and 329 deletions
|
|
@ -40,13 +40,13 @@ angular.module('copayApp.services').factory('amazonService', function($http, $lo
|
|||
};
|
||||
};
|
||||
|
||||
root.getEnvironment = function() {
|
||||
root.getNetwork = function() {
|
||||
_setCredentials();
|
||||
return credentials.NETWORK;
|
||||
};
|
||||
|
||||
root.savePendingGiftCard = function(gc, opts, cb) {
|
||||
var network = root.getEnvironment();
|
||||
var network = root.getNetwork();
|
||||
storageService.getAmazonGiftCards(network, function(err, oldGiftCards) {
|
||||
if (lodash.isString(oldGiftCards)) {
|
||||
oldGiftCards = JSON.parse(oldGiftCards);
|
||||
|
|
@ -74,7 +74,7 @@ angular.module('copayApp.services').factory('amazonService', function($http, $lo
|
|||
};
|
||||
|
||||
root.getPendingGiftCards = function(cb) {
|
||||
var network = root.getEnvironment();
|
||||
var network = root.getNetwork();
|
||||
storageService.getAmazonGiftCards(network, function(err, giftCards) {
|
||||
var _gcds = giftCards ? JSON.parse(giftCards) : null;
|
||||
return cb(err, _gcds);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue