handles incorrect Address derivation (#4230)
This commit is contained in:
parent
7cc3c5eb4f
commit
335c3f00af
3 changed files with 18 additions and 3 deletions
|
|
@ -115,6 +115,15 @@
|
||||||
</div>
|
</div>
|
||||||
</div> <!-- oh -->
|
</div> <!-- oh -->
|
||||||
|
|
||||||
|
<div class="oh pr m20t" ng-show="index.incorrectDerivation">
|
||||||
|
<div class="text-center text-warning">
|
||||||
|
<i class="fi-alert"></i>
|
||||||
|
<span translate>
|
||||||
|
WARNING: Key derivation is not working on this device/wallet. Actions cannot be performed on this wallet.
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="oh pr m20t" ng-show="index.notAuthorized && ! index.anyOnGoingProcess">
|
<div class="oh pr m20t" ng-show="index.notAuthorized && ! index.anyOnGoingProcess">
|
||||||
<div class="text-center text-warning">
|
<div class="text-center text-warning">
|
||||||
|
|
|
||||||
|
|
@ -136,6 +136,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
self.isPrivKeyEncrypted = fc.isPrivKeyEncrypted();
|
self.isPrivKeyEncrypted = fc.isPrivKeyEncrypted();
|
||||||
self.externalSource = fc.getPrivKeyExternalSourceName();
|
self.externalSource = fc.getPrivKeyExternalSourceName();
|
||||||
self.account = fc.credentials.account;
|
self.account = fc.credentials.account;
|
||||||
|
self.incorrectDerivation = fc.incorrectDerivation;
|
||||||
|
|
||||||
if (self.externalSource == 'trezor')
|
if (self.externalSource == 'trezor')
|
||||||
self.account++;
|
self.account++;
|
||||||
|
|
|
||||||
|
|
@ -75,9 +75,14 @@ angular.module('copayApp.services')
|
||||||
|
|
||||||
var client = bwcService.getClient(JSON.stringify(credentials));
|
var client = bwcService.getClient(JSON.stringify(credentials));
|
||||||
root.walletClients[credentials.walletId] = client;
|
root.walletClients[credentials.walletId] = client;
|
||||||
|
|
||||||
|
if (client.incorrectDerivation) {
|
||||||
|
storageService.clearLastAddress(credentials.walletId,function() {});
|
||||||
|
}
|
||||||
|
|
||||||
client.removeAllListeners();
|
client.removeAllListeners();
|
||||||
client.on('report', function(n) {
|
client.on('report', function(n) {
|
||||||
$log.info('BWC Report:'+ n);
|
$log.info('BWC Report:' + n);
|
||||||
});
|
});
|
||||||
|
|
||||||
client.on('notification', function(n) {
|
client.on('notification', function(n) {
|
||||||
|
|
@ -319,8 +324,8 @@ angular.module('copayApp.services')
|
||||||
|
|
||||||
// check if exist
|
// check if exist
|
||||||
if (lodash.find(root.profile.credentials, {
|
if (lodash.find(root.profile.credentials, {
|
||||||
'walletId': walletData.walletId
|
'walletId': walletData.walletId
|
||||||
})) {
|
})) {
|
||||||
return cb(gettext('Cannot join the same wallet more that once'));
|
return cb(gettext('Cannot join the same wallet more that once'));
|
||||||
}
|
}
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue