diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index a2b7adc5e6..00a9a6ec8b 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -1009,8 +1009,9 @@ static UniValue ProcessImport(CWallet * const pwallet, const UniValue& data, con throw JSONRPCError(RPC_WALLET_ERROR, "Error adding scriptPubKey script to wallet"); } - // add to address book or update label - if (IsValidDestination(scriptpubkey_dest)) { + // if not internal add to address book or update label + if (!internal) { + assert(IsValidDestination(scriptpubkey_dest)); pwallet->SetAddressBook(scriptpubkey_dest, label, "receive"); } @@ -1102,7 +1103,7 @@ UniValue importmulti(const JSONRPCRequest& mainRequest) " \"witnessscript\": \"