Amazon gift card
This commit is contained in:
parent
1de6b7abbf
commit
857385e115
6 changed files with 203 additions and 203 deletions
|
|
@ -16,14 +16,15 @@ angular.module('copayApp.controllers').controller('buyAmazonController',
|
|||
|
||||
this.init = function() {
|
||||
var network = amazonService.getEnvironment();
|
||||
self.allWallets = profileService.getWallets(network, 1);
|
||||
client = profileService.focusedClient;
|
||||
|
||||
if (!client) return;
|
||||
self.allWallets = profileService.getWallets({
|
||||
network: network,
|
||||
n: 1,
|
||||
onlyComplete: true
|
||||
});
|
||||
|
||||
if (lodash.isEmpty(self.allWallets)) return;
|
||||
|
||||
if (client.credentials.network != network) return;
|
||||
client = self.allWallets[0];
|
||||
|
||||
$timeout(function() {
|
||||
self.selectedWalletId = client.credentials.walletId;
|
||||
|
|
@ -157,28 +158,24 @@ angular.module('copayApp.controllers').controller('buyAmazonController',
|
|||
});
|
||||
return;
|
||||
}
|
||||
$scope.$emit('Local/NeedsConfirmation', createdTxp, function(accept) {
|
||||
if (accept) {
|
||||
self.confirmTx(createdTxp, function(err, tx) {
|
||||
if (err) {
|
||||
ongoingProcess.set('Processing Transaction...', false);
|
||||
self.error = bwcError.msg(err);
|
||||
$timeout(function() {
|
||||
$scope.$digest();
|
||||
});
|
||||
return;
|
||||
}
|
||||
var count = 0;
|
||||
ongoingProcess.set('Processing Transaction...', true);
|
||||
|
||||
dataSrc.accessKey = dataInvoice.accessKey;
|
||||
dataSrc.invoiceId = invoice.id;
|
||||
dataSrc.invoiceUrl = invoice.url;
|
||||
dataSrc.invoiceTime = invoice.invoiceTime;
|
||||
|
||||
self.debounceCreate(count, dataSrc);
|
||||
self.confirmTx(createdTxp, function(err, tx) {
|
||||
if (err) {
|
||||
ongoingProcess.set('Processing Transaction...', false);
|
||||
self.error = bwcError.msg(err);
|
||||
$timeout(function() {
|
||||
$scope.$digest();
|
||||
});
|
||||
return;
|
||||
}
|
||||
var count = 0;
|
||||
ongoingProcess.set('Processing Transaction...', true);
|
||||
|
||||
dataSrc.accessKey = dataInvoice.accessKey;
|
||||
dataSrc.invoiceId = invoice.id;
|
||||
dataSrc.invoiceUrl = invoice.url;
|
||||
dataSrc.invoiceTime = invoice.invoiceTime;
|
||||
|
||||
self.debounceCreate(count, dataSrc);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -608,13 +608,26 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
*
|
||||
*/
|
||||
|
||||
.state('amazon', {
|
||||
.state('amazon', {
|
||||
url: '/amazon',
|
||||
templateUrl: 'views/amazon.html'
|
||||
abstract: true,
|
||||
template: '<ion-nav-view name="amazon"></ion-nav-view>'
|
||||
})
|
||||
.state('buyAmazon', {
|
||||
url: '/buyamazon',
|
||||
templateUrl: 'views/buyAmazon.html'
|
||||
.state('amazon.main', {
|
||||
url: '/main',
|
||||
views: {
|
||||
'amazon': {
|
||||
templateUrl: 'views/amazon.html'
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('amazon.buy', {
|
||||
url: '/buy',
|
||||
views: {
|
||||
'amazon': {
|
||||
templateUrl: 'views/buyAmazon.html'
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
.run(function($rootScope, $state, $location, $log, $timeout, $ionicPlatform, lodash, platformInfo, profileService, uxLanguage, gettextCatalog) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.services').factory('txStatus', function(lodash, profileService, $timeout, platformInfo) {
|
||||
angular.module('copayApp.services').factory('txStatus', function($stateParams, lodash, profileService, $timeout, platformInfo) {
|
||||
var root = {};
|
||||
var isCordova = platformInfo.isCordova;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue