From 4c78d485a15c52c31f5f5f143d7bfa885cfa6350 Mon Sep 17 00:00:00 2001 From: Jorge Martins Date: Fri, 7 Oct 2022 16:40:27 +0200 Subject: [PATCH] Abort signing process ETH_PLUGIN_QUERY_* Before was not possible to abort the signing process even if the plugin return an error code. According to the docs any return code besides ETH_PLUGIN_RESULT_OK should abort the signing process. --- src/eth_plugin_handler.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/eth_plugin_handler.c b/src/eth_plugin_handler.c index e5187ca..22ffbe8 100644 --- a/src/eth_plugin_handler.c +++ b/src/eth_plugin_handler.c @@ -348,13 +348,13 @@ eth_plugin_result_t eth_plugin_call(int method, void *parameter) { } break; case ETH_PLUGIN_QUERY_CONTRACT_ID: - if (((ethQueryContractID_t *) parameter)->result <= ETH_PLUGIN_RESULT_UNSUCCESSFUL) { - return ETH_PLUGIN_RESULT_UNAVAILABLE; + if (((ethQueryContractID_t *) parameter)->result != ETH_PLUGIN_RESULT_OK) { + return ETH_PLUGIN_RESULT_ERROR; } break; case ETH_PLUGIN_QUERY_CONTRACT_UI: - if (((ethQueryContractUI_t *) parameter)->result <= ETH_PLUGIN_RESULT_UNSUCCESSFUL) { - return ETH_PLUGIN_RESULT_UNAVAILABLE; + if (((ethQueryContractUI_t *) parameter)->result != ETH_PLUGIN_RESULT_OK) { + return ETH_PLUGIN_RESULT_ERROR; } break; default: