Refactoring helper to get printable eth address from hex

This commit is contained in:
TamtamHero
2021-08-25 13:43:27 +02:00
parent dda1e20fb3
commit 3e25f04d05
8 changed files with 80 additions and 62 deletions

View File

@@ -212,12 +212,11 @@ void erc20_plugin_call(int message, void *parameters) {
strlcpy(msg->msg, context->contract_name, msg->msgLength);
} else {
strlcpy(msg->title, "Address", msg->titleLength);
msg->msg[0] = '0';
msg->msg[1] = 'x';
getEthAddressStringFromBinary(context->destinationAddress,
msg->msg + 2,
msg->pluginSharedRW->sha3,
chainConfig);
getEthDisplayableAddress(context->destinationAddress,
msg->msg,
msg->msgLength,
msg->pluginSharedRW->sha3,
chainConfig);
}
msg->result = ETH_PLUGIN_RESULT_OK;