mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Watchonly balances are shown separately in gui.
This commit is contained in:
parent
2935b21103
commit
ffd40da361
14 changed files with 597 additions and 233 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue