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>
|
||||||
|
|
||||||
<div class="oh p20t white" ng-if="tx.pendingForUs">
|
<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);"
|
<button class="button outline round dark-gray expand" ng-click="reject(tx);"
|
||||||
ng-disabled="loading">
|
ng-disabled="loading">
|
||||||
<i class="fi-x"></i>
|
<i class="fi-x"></i>
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,11 @@ angular.module('copayApp.services')
|
||||||
root.walletClients[credentials.walletId].started = true;
|
root.walletClients[credentials.walletId].started = true;
|
||||||
root.walletClients[credentials.walletId].doNotVerifyPayPro = isChromeApp;
|
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) {
|
client.initialize({}, function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
$log.error('Could not init notifications err:', err);
|
$log.error('Could not init notifications err:', err);
|
||||||
|
|
@ -110,8 +115,8 @@ angular.module('copayApp.services')
|
||||||
|
|
||||||
root.setWalletClients = function() {
|
root.setWalletClients = function() {
|
||||||
var credentials = root.profile.credentials;
|
var credentials = root.profile.credentials;
|
||||||
lodash.each(credentials, function(credentials) {
|
lodash.each(credentials, function(credential) {
|
||||||
root.setWalletClient(credentials);
|
root.setWalletClient(credential);
|
||||||
});
|
});
|
||||||
$rootScope.$emit('Local/WalletListUpdated');
|
$rootScope.$emit('Local/WalletListUpdated');
|
||||||
};
|
};
|
||||||
|
|
@ -630,7 +635,10 @@ angular.module('copayApp.services')
|
||||||
|
|
||||||
root.unlockFC = function(cb) {
|
root.unlockFC = function(cb) {
|
||||||
var fc = root.focusedClient;
|
var fc = root.focusedClient;
|
||||||
if (!fc.isPrivKeyEncrypted()) return cb();
|
|
||||||
|
if (!fc.isPrivKeyEncrypted())
|
||||||
|
return cb();
|
||||||
|
|
||||||
$log.debug('Wallet is encrypted');
|
$log.debug('Wallet is encrypted');
|
||||||
$rootScope.$emit('Local/NeedsPassword', false, function(err2, password) {
|
$rootScope.$emit('Local/NeedsPassword', false, function(err2, password) {
|
||||||
if (err2 || !password) {
|
if (err2 || !password) {
|
||||||
|
|
@ -646,12 +654,6 @@ angular.module('copayApp.services')
|
||||||
message: gettext('Wrong password')
|
message: gettext('Wrong password')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$timeout(function() {
|
|
||||||
if (fc.hasPrivKeyEncrypted()) {
|
|
||||||
$log.debug('Locking wallet automatically');
|
|
||||||
root.lockFC();
|
|
||||||
};
|
|
||||||
}, 60000);
|
|
||||||
return cb();
|
return cb();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue