Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util: Remove obsolete check in addr conversions #2608

Merged
merged 5 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/rpc/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/rpcwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading