From f3251a50572fd802b874f8133384226443a06a76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Wed, 11 Nov 2015 11:25:03 -0300 Subject: [PATCH] do not import address book if wallet already in Copay --- src/js/services/profileService.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js index 223443458..f159deeaf 100644 --- a/src/js/services/profileService.js +++ b/src/js/services/profileService.js @@ -408,9 +408,12 @@ angular.module('copayApp.services') var addressBook = str.addressBook || {}; var historyCache = str.historyCache ||  []; - root.setMetaData(walletClient, addressBook, historyCache, function(err) { - if (err) console.log(err); - root._addWalletClient(walletClient, opts, cb); + root._addWalletClient(walletClient, opts, function(err, walletId) { + if (err) return cb(err); + root.setMetaData(walletClient, addressBook, historyCache, function(error) { + if (error) console.log(error); + return cb(err, walletId); + }); }); };