diff --git a/src/rpc/util.cpp b/src/rpc/util.cpp index c1bbd27801..305f242848 100644 --- a/src/rpc/util.cpp +++ b/src/rpc/util.cpp @@ -158,9 +158,6 @@ CPubKey AddrToPubKey(FillableSigningProvider* const keystore, const std::string& if (!keystore->GetPubKey(key, vchPubKey)) { throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("no full public key for address %s", addr_in)); } - if (dest.index() == WitV16KeyEthHashType && vchPubKey.IsCompressed()) { - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("no valid public key for address %s", addr_in)); - } if (!vchPubKey.IsFullyValid()) { throw JSONRPCError(RPC_INTERNAL_ERROR, "Wallet contains an invalid public key"); } diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 1c99251e69..8063b4b749 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4322,7 +4322,7 @@ UniValue addressmap(const JSONRPCRequest &request) { if (key.IsCompressed()) { key.Decompress(); } - auto erc55 = EncodeDestination(WitnessV16EthHash(key)); + const auto erc55 = EncodeDestination(WitnessV16EthHash(key)); // Check if it's in the wallet. // Note: Can be removed if the full wallet is migrated. // Ref: https://github.com/DeFiCh/ain/issues/2604