aboutsummaryrefslogtreecommitdiff
path: root/src/rpcdump.cpp
diff options
context:
space:
mode:
authorJaSK <temp@temp.temp>2014-03-29 05:15:28 +0100
committerJaSK <temp@temp.temp>2014-07-02 15:48:38 +0200
commitffd40da361639faeef405c7e4a504a340d77aa5b (patch)
tree66131441451335db0f91a7d19cfddb9665aa82f1 /src/rpcdump.cpp
parent2935b211033610d7ef0deef9bf1b344a5bac029f (diff)
Watchonly balances are shown separately in gui.
Diffstat (limited to 'src/rpcdump.cpp')
-rw-r--r--src/rpcdump.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp
index 5b325c46ee..98af4695d6 100644
--- a/src/rpcdump.cpp
+++ b/src/rpcdump.cpp
@@ -158,12 +158,14 @@ Value importaddress(const Array& params, bool fHelp)
{
LOCK2(cs_main, pwalletMain->cs_wallet);
+ // add to address book or update label
+ pwalletMain->SetAddressBook(dest, strLabel, "receive");
+
// Don't throw error in case an address is already there
if (pwalletMain->HaveWatchOnly(dest))
return Value::null;
pwalletMain->MarkDirty();
- pwalletMain->SetAddressBook(dest, strLabel, "receive");
if (!pwalletMain->AddWatchOnly(dest))
throw JSONRPCError(RPC_WALLET_ERROR, "Error adding address to wallet");