From f8705a2f724e950afcc884394c011f8475e083c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Edgardo=20Baz=C3=A1n?= Date: Wed, 4 May 2016 14:37:38 -0300 Subject: [PATCH] Bump bwc version 2.3.1 (#4184) * bump new bwc version 2.3.1 * check incorrect derivation --- package.json | 2 +- src/js/services/profileService.js | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) 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 {