create new address on send
This commit is contained in:
parent
1323ad48db
commit
063b520db0
3 changed files with 54 additions and 14 deletions
|
|
@ -13,18 +13,32 @@
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<ul class="no-bullet">
|
<div class="onGoingProcess" ng-if="gettingAddress">
|
||||||
<li class="panel" ng-repeat="w in wallets">
|
<div class="onGoingProcess-content" ng-style="{'background-color':'#222'}">
|
||||||
<a ng-click="payment.selectWallet(w.id)">
|
<div class="spinner">
|
||||||
<div class="avatar-wallet"
|
<div class="rect1"></div>
|
||||||
ng-style="{'background-color':w.color}">{{(w.name || w.id) | limitTo: 1}}</div>
|
<div class="rect2"></div>
|
||||||
<div class="ellipsis">{{w.name || w.id}}</div>
|
<div class="rect3"></div>
|
||||||
<div class="size-12">{{w.m}} of {{w.n}}
|
<div class="rect4"></div>
|
||||||
<span ng-show="w.network=='testnet'">[Testnet]</span>
|
<div class="rect5"></div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
<span translate> Getting address for wallet {{selectedWalletName}} ...</span>
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
</div>
|
||||||
|
<div ng-if="!gettingAddress">
|
||||||
|
<ul class="no-bullet">
|
||||||
|
<li class="panel" ng-repeat="w in wallets">
|
||||||
|
<a ng-click="selectWallet(w.id, w.name)">
|
||||||
|
<div class="avatar-wallet"
|
||||||
|
ng-style="{'background-color':w.color}">{{(w.name || w.id) | limitTo: 1}}</div>
|
||||||
|
<div class="ellipsis">{{w.name || w.id}}</div>
|
||||||
|
<div class="size-12">{{w.m}} of {{w.n}}
|
||||||
|
<span ng-show="w.network=='testnet'">[Testnet]</span>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="extra-margin-bottom"></div>
|
<div class="extra-margin-bottom"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
self.copayers = walletStatus.wallet.copayers;
|
self.copayers = walletStatus.wallet.copayers;
|
||||||
self.preferences = walletStatus.preferences;
|
self.preferences = walletStatus.preferences;
|
||||||
self.setBalance(walletStatus.balance);
|
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();
|
$rootScope.$apply();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -129,14 +129,32 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
||||||
|
|
||||||
|
|
||||||
$scope.openWalletsModal = function(wallets) {
|
$scope.openWalletsModal = function(wallets) {
|
||||||
var fc = profileService.focusedClient;
|
|
||||||
|
|
||||||
var ModalInstanceCtrl = function($scope, $modalInstance) {
|
var ModalInstanceCtrl = function($scope, $modalInstance) {
|
||||||
$scope.wallets = wallets;
|
$scope.wallets = wallets;
|
||||||
$scope.cancel = function() {
|
$scope.cancel = function() {
|
||||||
$modalInstance.dismiss('cancel');
|
$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({
|
var modalInstance = $modal.open({
|
||||||
templateUrl: 'views/modals/wallets.html',
|
templateUrl: 'views/modals/wallets.html',
|
||||||
windowClass: 'full animated slideInUp',
|
windowClass: 'full animated slideInUp',
|
||||||
|
|
@ -147,6 +165,12 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
||||||
var m = angular.element(document.getElementsByClassName('reveal-modal'));
|
var m = angular.element(document.getElementsByClassName('reveal-modal'));
|
||||||
m.addClass('slideOutDown');
|
m.addClass('slideOutDown');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modalInstance.result.then(function(addr) {
|
||||||
|
if (addr) {
|
||||||
|
self.setForm(addr);
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
this.openTxpModal = function(tx, copayers) {
|
this.openTxpModal = function(tx, copayers) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue