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.
This commit is contained in:
Jorge Martins
2022-10-07 16:40:27 +02:00
parent d839c35d2e
commit 4c78d485a1

View File

@@ -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: