buyAndSell services + nextSteps

This commit is contained in:
Matias Alejo Garcia 2017-01-30 18:04:17 -03:00
commit d85da2cc45
No known key found for this signature in database
GPG key ID: 02470DB551277AB3
15 changed files with 340 additions and 192 deletions

View file

@ -1,5 +1,5 @@
'use strict';
angular.module('copayApp.services').factory('amazonService', function($http, $log, lodash, moment, storageService, configService, platformInfo) {
angular.module('copayApp.services').factory('amazonService', function($http, $log, lodash, moment, storageService, configService, platformInfo, nextStepsService) {
var root = {};
var credentials = {};
@ -69,8 +69,9 @@ angular.module('copayApp.services').factory('amazonService', function($http, $lo
});
});
// TODO
// Show pending task from the UI
storageService.setNextStep('AmazonGiftCards', 'true', function(err) {});
// storageService.setNextStep('AmazonGiftCards', 'true', function(err) {});
};
root.getPendingGiftCards = function(cb) {
@ -144,6 +145,16 @@ angular.module('copayApp.services').factory('amazonService', function($http, $lo
});
};
return root;
var register = function () {
nextStepsService.register({
name: 'amazon',
title: 'Buy a gift card',
icon: 'icon-amazon',
sref: 'tabs.giftcards.amazon',
});
};
register();
return root;
});