better -generating address- status
This commit is contained in:
parent
92e6015e3a
commit
9ab6c09d5d
4 changed files with 40 additions and 13 deletions
|
|
@ -1144,11 +1144,13 @@ input.ng-invalid-match, input.ng-invalid-match:focus {
|
|||
|
||||
/*/////////////////// SPINNER ////////////////////*/
|
||||
|
||||
#history .spinner {
|
||||
#history .spinner, #receive .spinner {
|
||||
height: 46px;
|
||||
}
|
||||
|
||||
#history .spinner > div {
|
||||
#history .spinner > div,
|
||||
#receive .spinner > div
|
||||
{
|
||||
background-color: #7A8C9E;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -272,17 +272,21 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
|
||||
this.newAddress = function() {
|
||||
var fc = profileService.focusedClient;
|
||||
self.setOngoingProcess('Generating Address');
|
||||
self.generatingAddress = true;
|
||||
fc.createAddress(function(err, addr) {
|
||||
self.setOngoingProcess();
|
||||
if (err) {
|
||||
$log.debug('Creating address ERROR:', err);
|
||||
$scope.$emit('Local/ClientError', err);
|
||||
} else {
|
||||
self.addr = addr.address;
|
||||
storageService.storeLastAddress(fc.credentials.walletId, addr.address, function() {});
|
||||
self.generatingAddress = false;
|
||||
$scope.$digest();
|
||||
return;
|
||||
}
|
||||
$scope.$digest();
|
||||
self.addr = addr.address;
|
||||
storageService.storeLastAddress(fc.credentials.walletId, addr.address, function() {
|
||||
|
||||
self.generatingAddress = false;
|
||||
$scope.$digest();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -290,7 +294,8 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
var fc = profileService.focusedClient;
|
||||
$timeout(function() {
|
||||
storageService.getLastAddress(fc.credentials.walletId, function(err, addr) {
|
||||
if (addr) {
|
||||
// TODO
|
||||
if (addr && 0) {
|
||||
self.addr = addr;
|
||||
} else {
|
||||
self.newAddress();
|
||||
|
|
@ -500,7 +505,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
profileService.lockFC();
|
||||
self.setOngoingProcess();
|
||||
|
||||
if (err) {
|
||||
if (err) {
|
||||
return cb(err);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue