diff --git a/libraries/plugins/peerplays_sidechain/include/graphene/peerplays_sidechain/sidechain_net_handler_eth.hpp b/libraries/plugins/peerplays_sidechain/include/graphene/peerplays_sidechain/sidechain_net_handler_eth.hpp index 40f2a7ae..d322da3a 100644 --- a/libraries/plugins/peerplays_sidechain/include/graphene/peerplays_sidechain/sidechain_net_handler_eth.hpp +++ b/libraries/plugins/peerplays_sidechain/include/graphene/peerplays_sidechain/sidechain_net_handler_eth.hpp @@ -131,6 +131,7 @@ private: ethereum_function_call_encoder m_ethereum_function_call_encoder; + std::string signature; std::string geth_url; uint64_t t_id; std::string account_address; diff --git a/libraries/plugins/peerplays_sidechain/sidechain_net_handler_eth.cpp b/libraries/plugins/peerplays_sidechain/sidechain_net_handler_eth.cpp index 7fe06e86..2b939085 100644 --- a/libraries/plugins/peerplays_sidechain/sidechain_net_handler_eth.cpp +++ b/libraries/plugins/peerplays_sidechain/sidechain_net_handler_eth.cpp @@ -140,6 +140,12 @@ void eth_rpc_client::on_message(websocketpp::connection_hdl hdl, message_ptr msg ilog("json reposnse: ${list}", ("list", list)); const auto& b_obj = list[0].get_object().find( "id" ); + + if (true == list[0].get_object().contains( "error" )){ + elog("error in json reposnse: ${list}", ("list", list)); + return; + } + std::string result_str = list[0].get_object().find( "result" )->value().as(1); uint32_t num_owners = 0; uint32_t i = 0; @@ -167,6 +173,7 @@ void eth_rpc_client::on_message(websocketpp::connection_hdl hdl, message_ptr msg balance = result_str; break; case ETH_SIGN: + signature = result_str; break; case ETH_COINBASE: account_address = result_str;