diff --git a/public/views/modals/destination-address.html b/public/views/modals/destination-address.html
index a7959b2bc..42c80c572 100644
--- a/public/views/modals/destination-address.html
+++ b/public/views/modals/destination-address.html
@@ -25,15 +25,15 @@
+
@@ -508,7 +504,7 @@
Cancel
-
diff --git a/src/css/main.css b/src/css/main.css
index 455cac320..2331f8f7f 100644
--- a/src/css/main.css
+++ b/src/css/main.css
@@ -603,10 +603,6 @@ ul.manage li {
color: #fff;
}
-.name-wallet i {
- color: #B6E9DF;
-}
-
.locked {
font-size: 11px;
color: #7A8C9E;
diff --git a/src/js/controllers/index.js b/src/js/controllers/index.js
index 3ad881565..69363bd16 100644
--- a/src/js/controllers/index.js
+++ b/src/js/controllers/index.js
@@ -128,6 +128,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.isPrivKeyEncrypted = fc.isPrivKeyEncrypted();
self.externalSource = fc.getPrivKeyExternalSourceName();
self.account = fc.credentials.account;
+ self.needsBackup = profileService.isBackupNeeded(self.walletId);
if (self.externalSource == 'trezor')
self.account++;
@@ -152,19 +153,16 @@ angular.module('copayApp.controllers').controller('indexController', function($r
}
}
- profileService.isBackupNeeded(self.walletId, function(needsBackup) {
- self.needsBackup = needsBackup;
- self.openWallet(function() {
- if (!self.isComplete) {
- $log.debug('Wallet not complete after update... redirecting');
- go.path('copayers');
- } else {
- if ($state.is('copayers')) {
- $log.debug('Wallet Complete after update... redirect to home');
- go.walletHome();
- }
+ self.openWallet(function() {
+ if (!self.isComplete) {
+ $log.debug('Wallet not complete after update... redirecting');
+ go.path('copayers');
+ } else {
+ if ($state.is('copayers')) {
+ $log.debug('Wallet Complete after update... redirect to home');
+ go.walletHome();
}
- });
+ }
});
});
};
@@ -1491,7 +1489,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
});
});
- //untilItChange FALSE
+ //untilItChange FALSE
lodash.each(['NewTxProposal', 'TxProposalFinallyRejected', 'TxProposalRemoved', 'NewOutgoingTxByThirdParty',
'Local/GlideraTx'
], function(eventName) {
diff --git a/src/js/controllers/walletHome.js b/src/js/controllers/walletHome.js
index 0cf5c7cc9..3a72ecb4e 100644
--- a/src/js/controllers/walletHome.js
+++ b/src/js/controllers/walletHome.js
@@ -130,7 +130,6 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
var confirm_msg = gettextCatalog.getString('Confirm');
this.openDestinationAddressModal = function(wallets, address) {
- self.destinationWalletNeedsBackup = null;
$rootScope.modalOpened = true;
var fc = profileService.focusedClient;
self.lockAddress = false;
@@ -261,10 +260,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
return;
}
- profileService.isBackupNeeded(walletId, function(needsBackup) {
- self.destinationWalletNeedsBackup = needsBackup;
- $modalInstance.close(addr);
- });
+ $modalInstance.close(addr);
});
};
};
@@ -856,7 +852,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
};
this.submitForm = function() {
- if (!$scope._amount || !$scope._address || self.destinationWalletNeedsBackup) return;
+ if (!$scope._amount || !$scope._address) return;
var fc = profileService.focusedClient;
var unitToSat = this.unitToSatoshi;
var currentSpendUnconfirmed = configWallet.spendUnconfirmed;
@@ -988,7 +984,6 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
this.resetForm = function() {
this.resetError();
- this.destinationWalletNeedsBackup = null;
this._paypro = null;
this.lockedCurrentFeePerKb = null;
diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js
index 9a33010ad..7728b6152 100644
--- a/src/js/services/profileService.js
+++ b/src/js/services/profileService.js
@@ -181,18 +181,6 @@ angular.module('copayApp.services')
});
};
- root.isBackupNeeded = function(walletId, cb) {
- var c = root.getClient(walletId);
- if (c.isPrivKeyExternal()) return cb(false);
- if (!c.credentials.mnemonic) return cb(false);
- if (c.credentials.network == 'testnet') return cb(false);
-
- storageService.getBackupFlag(walletId, function(err, val) {
- if (err || val) return cb(false);
- return cb(true);
- });
- };
-
root._seedWallet = function(opts, cb) {
opts = opts || {};
if (opts.bwsurl)
@@ -306,8 +294,8 @@ angular.module('copayApp.services')
// check if exist
if (lodash.find(root.profile.credentials, {
- 'walletId': walletData.walletId
- })) {
+ 'walletId': walletData.walletId
+ })) {
return cb(gettext('Cannot join the same wallet more that once'));
}
} catch (ex) {
@@ -680,6 +668,14 @@ angular.module('copayApp.services')
});
};
+ root.isBackupNeeded = function(walletId) {
+ var c = root.getClient(walletId);
+ if (c.isPrivKeyExternal()) return false;
+ if (!c.credentials.mnemonic) return false;
+ if (c.credentials.network == 'testnet') return false;
+ return true;
+ };
+
root.getWallets = function(network) {
if (!root.profile) return [];
@@ -694,7 +690,8 @@ angular.module('copayApp.services')
id: c.walletId,
network: c.network,
color: config.colorFor[c.walletId] || '#4A90E2',
- copayerId: c.copayerId
+ copayerId: c.copayerId,
+ needsBackup: root.isBackupNeeded(c.walletId)
};
});
if (network) {