diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index 5800e7582..a55c53973 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -996,8 +996,9 @@ static UniValue ProcessImport(CWallet * const pwallet, const UniValue& data, con throw JSONRPCError(RPC_WALLET_ERROR, "Error adding address to wallet"); } - // add to address book or update label - if (IsValidDestination(pubkey_dest)) { + // if not internal add to address book or update label + if (!internal) { + assert(IsValidDestination(pubkey_dest)); pwallet->SetAddressBook(pubkey_dest, label, "receive"); } @@ -1148,7 +1149,7 @@ UniValue importmulti(const JSONRPCRequest& mainRequest) " \"redeemscript\": \"