fix payment intent
This commit is contained in:
parent
a70e7e61a4
commit
aa43273f8d
5 changed files with 29 additions and 38 deletions
|
|
@ -1,27 +1,9 @@
|
|||
var bitcore = require('bitcore');
|
||||
|
||||
angular.module('copayApp.controllers').controller('walletForPaymentController', function($rootScope, $scope, $modal, go) {
|
||||
|
||||
console.log('[walletForPayment.js.4]'); //TODO
|
||||
if (!$rootScope.pendingPayment) {
|
||||
go.walletHome();
|
||||
} else {
|
||||
|
||||
console.log('[walletForPayment.js.9]'); //TODO
|
||||
$scope.selectWallet(function(w) {
|
||||
if (w) {
|
||||
identityService.setFocusedWallet(w);
|
||||
go.send();
|
||||
} else {
|
||||
go.walletHome();
|
||||
}
|
||||
});
|
||||
}
|
||||
angular.module('copayApp.controllers').controller('walletForPaymentController', function($rootScope, $scope, $modal, identityService, go) {
|
||||
|
||||
$scope.selectWallet = function(cb) {
|
||||
|
||||
console.log('[walletForPayment.js.22]'); //TODO
|
||||
var ModalInstanceCtrl = function($scope, $modalInstance, $identityService) {
|
||||
var ModalInstanceCtrl = function($scope, $modalInstance, identityService) {
|
||||
$scope.loading = true;
|
||||
preconditions.checkState($rootScope.iden);
|
||||
|
||||
|
|
@ -31,9 +13,7 @@ console.log('[walletForPayment.js.22]'); //TODO
|
|||
});
|
||||
|
||||
$scope.setWallets = function() {
|
||||
$scope.wallets = _.filter($rootScope.iden.listWallets(), function(w) {
|
||||
return w.balanceInfo && w.balanceInfo.totalBalanceBTC;
|
||||
});
|
||||
$scope.wallets = $rootScope.iden.listWallets();
|
||||
};
|
||||
|
||||
$scope.ok = function(w) {
|
||||
|
|
@ -47,11 +27,25 @@ console.log('[walletForPayment.js.22]'); //TODO
|
|||
};
|
||||
};
|
||||
|
||||
console.log('[walletForPayment.js.49]'); //TODO
|
||||
$modal.open({
|
||||
templateUrl: 'views/modals/walletSelect.html',
|
||||
templateUrl: 'views/modals/walletSelection.html',
|
||||
windowClass: 'tiny',
|
||||
controller: ModalInstanceCtrl,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// INIT: (not it a function, since there is no associated html)
|
||||
if (!$rootScope.pendingPayment) {
|
||||
go.walletHome();
|
||||
} else {
|
||||
$scope.selectWallet(function(w) {
|
||||
if (w) {
|
||||
identityService.setFocusedWallet(w);
|
||||
go.send();
|
||||
} else {
|
||||
go.walletHome();
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue