aboutsummaryrefslogtreecommitdiff
path: root/src/rpcdump.cpp
diff options
context:
space:
mode:
authorJaSK <[email protected]>2014-03-29 05:15:28 +0100
committerJaSK <[email protected]>2014-07-02 15:48:38 +0200
commitffd40da361639faeef405c7e4a504a340d77aa5b (patch)
tree66131441451335db0f91a7d19cfddb9665aa82f1 /src/rpcdump.cpp
parentqt: Hide unspendable outputs in coin control (diff)
downloaddiscoin-ffd40da361639faeef405c7e4a504a340d77aa5b.tar.xz
discoin-ffd40da361639faeef405c7e4a504a340d77aa5b.zip
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 5b325c46e..98af4695d 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");