hide "reject" button in 1-1 + autolock unlocked encrypted wallets on startup
This commit is contained in:
parent
50497c8e52
commit
6d35fe1239
2 changed files with 12 additions and 10 deletions
|
|
@ -42,7 +42,7 @@
|
|||
</div>
|
||||
|
||||
<div class="oh p20t white" ng-if="tx.pendingForUs">
|
||||
<div class="large-6 medium-6 small-6 columns">
|
||||
<div class="large-6 medium-6 small-6 columns" ng-show="isShared">
|
||||
<button class="button outline round dark-gray expand" ng-click="reject(tx);"
|
||||
ng-disabled="loading">
|
||||
<i class="fi-x"></i>
|
||||
|
|
|
|||
|
|
@ -99,6 +99,11 @@ angular.module('copayApp.services')
|
|||
root.walletClients[credentials.walletId].started = true;
|
||||
root.walletClients[credentials.walletId].doNotVerifyPayPro = isChromeApp;
|
||||
|
||||
if (client.hasPrivKeyEncrypted() && !client.isPrivKeyEncrypted()) {
|
||||
$log.warn('Auto locking unlocked wallet:' + credentials.walletId);
|
||||
client.lock();
|
||||
}
|
||||
|
||||
client.initialize({}, function(err) {
|
||||
if (err) {
|
||||
$log.error('Could not init notifications err:', err);
|
||||
|
|
@ -110,8 +115,8 @@ angular.module('copayApp.services')
|
|||
|
||||
root.setWalletClients = function() {
|
||||
var credentials = root.profile.credentials;
|
||||
lodash.each(credentials, function(credentials) {
|
||||
root.setWalletClient(credentials);
|
||||
lodash.each(credentials, function(credential) {
|
||||
root.setWalletClient(credential);
|
||||
});
|
||||
$rootScope.$emit('Local/WalletListUpdated');
|
||||
};
|
||||
|
|
@ -630,7 +635,10 @@ angular.module('copayApp.services')
|
|||
|
||||
root.unlockFC = function(cb) {
|
||||
var fc = root.focusedClient;
|
||||
if (!fc.isPrivKeyEncrypted()) return cb();
|
||||
|
||||
if (!fc.isPrivKeyEncrypted())
|
||||
return cb();
|
||||
|
||||
$log.debug('Wallet is encrypted');
|
||||
$rootScope.$emit('Local/NeedsPassword', false, function(err2, password) {
|
||||
if (err2 || !password) {
|
||||
|
|
@ -646,12 +654,6 @@ angular.module('copayApp.services')
|
|||
message: gettext('Wrong password')
|
||||
});
|
||||
}
|
||||
$timeout(function() {
|
||||
if (fc.hasPrivKeyEncrypted()) {
|
||||
$log.debug('Locking wallet automatically');
|
||||
root.lockFC();
|
||||
};
|
||||
}, 60000);
|
||||
return cb();
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue