create new address on send
This commit is contained in:
parent
1323ad48db
commit
063b520db0
3 changed files with 54 additions and 14 deletions
|
|
@ -237,7 +237,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
|||
self.copayers = walletStatus.wallet.copayers;
|
||||
self.preferences = walletStatus.preferences;
|
||||
self.setBalance(walletStatus.balance);
|
||||
self.otherWallets = profileService.getWallets(self.network);
|
||||
self.otherWallets = lodash.filter(profileService.getWallets(self.network), function(w) {
|
||||
return w.id != self.walletId;
|
||||
});;
|
||||
$rootScope.$apply();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -129,14 +129,32 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
|
||||
|
||||
$scope.openWalletsModal = function(wallets) {
|
||||
var fc = profileService.focusedClient;
|
||||
|
||||
var ModalInstanceCtrl = function($scope, $modalInstance) {
|
||||
$scope.wallets = wallets;
|
||||
$scope.cancel = function() {
|
||||
$modalInstance.dismiss('cancel');
|
||||
};
|
||||
|
||||
$scope.selectWallet = function(walletId, walletName) {
|
||||
$scope.gettingAddress=true;
|
||||
$scope.selectedWalletName=walletName;
|
||||
$timeout(function(){
|
||||
$scope.$apply();
|
||||
});
|
||||
addressService.getAddress(walletId,true, function(err,addr) {
|
||||
$scope.gettingAddress=false;
|
||||
if (!err || addr)
|
||||
$modalInstance.close(addr);
|
||||
else {
|
||||
parseError(err);
|
||||
self.error = err;
|
||||
$modalInstance.dismiss('cancel');
|
||||
}
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
var modalInstance = $modal.open({
|
||||
templateUrl: 'views/modals/wallets.html',
|
||||
windowClass: 'full animated slideInUp',
|
||||
|
|
@ -147,6 +165,12 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
var m = angular.element(document.getElementsByClassName('reveal-modal'));
|
||||
m.addClass('slideOutDown');
|
||||
});
|
||||
|
||||
modalInstance.result.then(function(addr) {
|
||||
if (addr) {
|
||||
self.setForm(addr);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
this.openTxpModal = function(tx, copayers) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue