Skip to content

Commit ffde305

Browse files
committed
Remove eosio-key option
1 parent f4af594 commit ffde305

File tree

4 files changed

+1
-14
lines changed

4 files changed

+1
-14
lines changed

plugins/wallet_plugin/include/eosio/wallet_plugin/wallet_manager.hpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ class wallet_manager {
3939
/// @param secs The timeout in seconds.
4040
void set_timeout(int64_t secs) { set_timeout(std::chrono::seconds(secs)); }
4141

42-
void set_eosio_key(const std::string& key) { eosio_key = key; }
43-
4442
/// Sign transaction with the private keys specified via their public keys.
4543
/// Use chain_controller::get_required_keys to determine which keys are needed for txn.
4644
/// @param txn the transaction to sign.
@@ -109,7 +107,7 @@ class wallet_manager {
109107

110108
/// Removes a key from the specified wallet.
111109
/// Wallet must be opened and unlocked.
112-
/// @param name the name of the wallet to import into.
110+
/// @param name the name of the wallet to remove the key from.
113111
/// @param password the plaintext password returned from ::create.
114112
/// @param key the Public Key to remove, e.g. EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
115113
/// @throws fc::exception if wallet not found or locked or key is not removed.
@@ -134,7 +132,6 @@ class wallet_manager {
134132
std::chrono::seconds timeout = std::chrono::seconds::max(); ///< how long to wait before calling lock_all()
135133
mutable timepoint_t timeout_time = timepoint_t::max(); ///< when to call lock_all()
136134
boost::filesystem::path dir = ".";
137-
std::string eosio_key;
138135
};
139136

140137
} // namespace wallet

plugins/wallet_plugin/wallet_manager.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ std::string wallet_manager::create(const std::string& name) {
5656
wallet->set_password(password);
5757
wallet->set_wallet_filename(wallet_filename.string());
5858
wallet->unlock(password);
59-
if(eosio_key.size())
60-
wallet->import_key(eosio_key);
6159
wallet->lock();
6260
wallet->unlock(password);
6361

plugins/wallet_plugin/wallet_plugin.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ void wallet_plugin::set_program_options(options_description& cli, options_descri
3232
"Timeout for unlocked wallet in seconds (default 900 (15 minutes)). "
3333
"Wallets will automatically lock after specified number of seconds of inactivity. "
3434
"Activity is defined as any wallet command e.g. list-wallets.")
35-
("eosio-key", bpo::value<std::string>(),
36-
"eosio key that will be imported automatically when a wallet is created.")
3735
;
3836
}
3937

@@ -52,9 +50,5 @@ void wallet_plugin::plugin_initialize(const variables_map& options) {
5250
std::chrono::seconds t(timeout);
5351
wallet_manager_ptr->set_timeout(t);
5452
}
55-
if (options.count("eosio-key")) {
56-
std::string eosio_wif_key = options.at("eosio-key").as<std::string>();
57-
wallet_manager_ptr->set_eosio_key(eosio_wif_key);
58-
}
5953
}
6054
} // namespace eosio

tests/wallet_tests.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,6 @@ BOOST_AUTO_TEST_CASE(wallet_manager_test)
188188

189189
wm.set_timeout(chrono::seconds(15));
190190

191-
wm.set_eosio_key("");
192-
193191
wm.create("testgen");
194192
BOOST_CHECK_THROW(wm.create_key("testgen", "xxx"), chain::wallet_exception);
195193
wm.lock("testgen");

0 commit comments

Comments
 (0)