Skip to content

Commit

Permalink
call gui_mod::entropy from select_key functor
Browse files Browse the repository at this point in the history
  • Loading branch information
sinev-valentine committed Mar 14, 2019
1 parent 0a46b4a commit 0190d5d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion keychain_lib/include/keychain_lib/keychain_commands.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,14 @@ struct keychain_command<command_te::select_key>: keychain_command_base
using params_t = void;
virtual std::string operator()(keychain_base* keychain, const fc_light::variant& params_variant, int id) const override
{
auto public_key = *keychain->select_key();
auto& keyfiles = keyfile_singleton::instance();
auto it = keyfiles.begin();
if ( it==keyfiles.end() )
{
auto res = keychain->entropy();
}

auto public_key = *keychain->select_key();
if(!public_key)
FC_LIGHT_THROW_EXCEPTION(fc_light::public_key_not_selected, "");
json_response response(to_hex(public_key.data(), public_key.size).c_str(), id);
Expand Down

0 comments on commit 0190d5d

Please sign in to comment.