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

Add Eth_Accounts RPC #1916

Merged
merged 2 commits into from
Apr 17, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Return only Eth addresses in eth_accounts RPC
cedric ogire committed Apr 17, 2023

Unverified

No user is associated with the committer email.
commit 87e5a740da03834caaf8d88009c61840d6f02892
4 changes: 3 additions & 1 deletion src/ffi/ffiexports.cpp
Original file line number Diff line number Diff line change
@@ -56,7 +56,9 @@ rust::vec<rust::string> getAccounts() {
std::vector<std::shared_ptr<CWallet>> const wallets = GetWallets();
for (const std::shared_ptr<CWallet>& wallet : wallets) {
for (auto & it : wallet->mapAddressBook)
addresses.push_back(EncodeDestination(it.first));
if (std::holds_alternative<WitnessV16EthHash>(it.first)) {
addresses.push_back(EncodeDestination(it.first));
}
}
return addresses;
}