Skip to content

Commit

Permalink
#1825 Fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
DmytroNazarenko committed Mar 18, 2024
1 parent b1ccbf1 commit 18c5f04
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libweb3jsonrpc/JsonHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,10 +478,10 @@ TransactionSkeleton toTransactionSkeleton( Json::Value const& _json ) {
if ( !_json["gasPrice"].empty() )
ret.gasPrice = jsToU256( _json["gasPrice"].asString() );

if ( !_json["data"].empty() )
if ( !_json["data"].empty() )
ret.data = jsToBytes( _json["data"].asString(), OnFailed::Throw );

if ( !_json["input"].empty() )
if ( !_json["input"].empty() )
ret.data = jsToBytes( _json["input"].asString(), OnFailed::Throw );

if ( !_json["code"].empty() )
Expand Down Expand Up @@ -534,13 +534,13 @@ TransactionSkeleton rapidJsonToTransactionSkeleton( rapidjson::Value const& _jso
ret.gasPrice = jsToU256( _json["gasPrice"].GetString() );
}

if ( _json.HasMember( "data" ) ) {
if ( _json.HasMember( "data" ) ) {
if ( !_json["data"].IsString() )
throw jsonrpc::JsonRpcException( jsonrpc::Errors::ERROR_RPC_INVALID_PARAMS );
ret.data = jsToBytes( _json["data"].GetString(), OnFailed::Throw );
}

if ( _json.HasMember( "input" ) ) {
if ( _json.HasMember( "input" ) ) {
if ( !_json["input"].IsString() )
throw jsonrpc::JsonRpcException( jsonrpc::Errors::ERROR_RPC_INVALID_PARAMS );
ret.data = jsToBytes( _json["input"].GetString(), OnFailed::Throw );
Expand Down

0 comments on commit 18c5f04

Please sign in to comment.