Skip to content

Commit

Permalink
fix expert mode print string
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-modelist-dev committed Feb 5, 2019
1 parent 22ca2f3 commit 58e35b0
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions keychain_lib/src/secmod_parser_cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,21 @@ events_te secmod_parser_f::operator()(const std::string& json)

std::string to_expert_mode_string(const signhex_event& signhex_event)
{
switch (signhex_event.blockchain)
{
case blockchain_secmod_te::unknown:
return signhex_event.trx_view.as<std::string>();
case blockchain_secmod_te::bitcoin:
return PRETTY_PRINT(blockchain_secmod_te::bitcoin);
case blockchain_secmod_te::ethereum:
return PRETTY_PRINT(blockchain_secmod_te::ethereum);
case blockchain_secmod_te::ethereum_swap:
return PRETTY_PRINT(blockchain_secmod_te::ethereum_swap);
if (!signhex_event.is_parsed)
return signhex_event.trx_view.as<std::string>();
switch (signhex_event.blockchain)
{
case blockchain_secmod_te::unknown:
return signhex_event.trx_view.as<std::string>();
case blockchain_secmod_te::bitcoin:
return PRETTY_PRINT(blockchain_secmod_te::bitcoin);
case blockchain_secmod_te::ethereum:
return PRETTY_PRINT(blockchain_secmod_te::ethereum);
case blockchain_secmod_te::ethereum_swap:
return PRETTY_PRINT(blockchain_secmod_te::ethereum_swap);
default:
FC_LIGHT_ASSERT(false);
break;
break;
}
}

Expand Down

0 comments on commit 58e35b0

Please sign in to comment.