Merge pull request #5637 from gabrielbazan7/feat/allowmultisig

allow buying amazon gift cards with multisig wallets
This commit is contained in:
Gustavo Maximiliano Cortez 2017-02-20 17:55:31 -03:00 committed by GitHub
commit d00cd5b25d

View file

@ -26,7 +26,7 @@ angular.module('copayApp.controllers').controller('buyAmazonController', functio
popupService.showAlert(msg, err); popupService.showAlert(msg, err);
}; };
var publishAndSign = function (wallet, txp, onSendStatusChange, cb) { var publishAndSign = function(wallet, txp, onSendStatusChange, cb) {
if (!wallet.canSign() && !wallet.isPrivKeyExternal()) { if (!wallet.canSign() && !wallet.isPrivKeyExternal()) {
var err = 'No signing proposal: No private key'; var err = 'No signing proposal: No private key';
$log.info(err); $log.info(err);
@ -39,9 +39,9 @@ angular.module('copayApp.controllers').controller('buyAmazonController', functio
}, onSendStatusChange); }, onSendStatusChange);
}; };
var statusChangeHandler = function (processName, showName, isOn) { var statusChangeHandler = function(processName, showName, isOn) {
$log.debug('statusChangeHandler: ', processName, showName, isOn); $log.debug('statusChangeHandler: ', processName, showName, isOn);
if ( processName == 'buyingGiftCard' && !isOn) { if (processName == 'buyingGiftCard' && !isOn) {
$scope.sendStatus = 'success'; $scope.sendStatus = 'success';
$timeout(function() { $timeout(function() {
$scope.$digest(); $scope.$digest();
@ -111,7 +111,6 @@ angular.module('copayApp.controllers').controller('buyAmazonController', functio
$scope.network = amazonService.getNetwork(); $scope.network = amazonService.getNetwork();
$scope.wallets = profileService.getWallets({ $scope.wallets = profileService.getWallets({
m: 1, // Only 1-signature wallet
onlyComplete: true, onlyComplete: true,
network: $scope.network network: $scope.network
}); });
@ -250,7 +249,9 @@ angular.module('copayApp.controllers').controller('buyAmazonController', functio
disableAnimate: true disableAnimate: true
}); });
$state.transitionTo('tabs.giftcards.amazon').then(function() { $state.transitionTo('tabs.giftcards.amazon').then(function() {
$state.transitionTo('tabs.giftcards.amazon.cards', { cardClaimCode: claimCode }); $state.transitionTo('tabs.giftcards.amazon.cards', {
cardClaimCode: claimCode
});
}); });
}); });
}; };