diff --git a/package.json b/package.json index 004198df7..d15c3d5e4 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "url": "https://github.com/bitpay/copay/issues" }, "dependencies": { - "bitcore-wallet-client": "2.3.0", + "bitcore-wallet-client": "2.3.1", "express": "^4.11.2", "fs": "0.0.2", "grunt": "^0.4.5", diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js index 1dc8deb8e..30764e0fc 100644 --- a/src/js/services/profileService.js +++ b/src/js/services/profileService.js @@ -75,6 +75,11 @@ angular.module('copayApp.services') var client = bwcService.getClient(JSON.stringify(credentials)); root.walletClients[credentials.walletId] = client; + if(client.incorrectDerivation) { + storageService.clearLastAddress(credentials.walletId, function(err) { + if (err) $log.warn(err); + }); + } client.removeAllListeners(); client.on('report', function(n) { $log.info('BWC Report:'+ n); @@ -678,10 +683,10 @@ angular.module('copayApp.services') $log.debug('Wallet is encrypted'); $rootScope.$emit('Local/NeedsPassword', false, function(err2, password) { - if (err2) + if (err2) return cb(err2); - if (!password) + if (!password) return cb(gettext('Password needed')); try {