Update some prototypes to use chainId value instead of chainConfig structure

This commit is contained in:
TamtamHero
2021-08-30 11:02:55 +02:00
parent 3e25f04d05
commit 0d45d2e2d0
10 changed files with 27 additions and 33 deletions

View File

@@ -216,7 +216,7 @@ void erc20_plugin_call(int message, void *parameters) {
msg->msg,
msg->msgLength,
msg->pluginSharedRW->sha3,
chainConfig);
chainConfig->chainId);
}
msg->result = ETH_PLUGIN_RESULT_OK;

View File

@@ -5,12 +5,6 @@
#include "ethUtils.h"
#include "utils.h"
void getEthDisplayableAddress(uint8_t *in,
char *out,
size_t out_len,
cx_sha3_t *sha3,
chain_config_t *chain_config);
typedef struct erc721_parameters_t {
uint8_t selectorIndex;
uint8_t address[ADDRESS_LENGTH];
@@ -126,7 +120,7 @@ void erc721_plugin_call(int message, void *parameters) {
msg->msg,
msg->msgLength,
&global_sha3,
chainConfig);
chainConfig->chainId);
msg->result = ETH_PLUGIN_RESULT_OK;
break;
@@ -136,7 +130,7 @@ void erc721_plugin_call(int message, void *parameters) {
msg->msg,
msg->msgLength,
&global_sha3,
chainConfig);
chainConfig->chainId);
msg->result = ETH_PLUGIN_RESULT_OK;
break;

View File

@@ -121,7 +121,7 @@ void eth2_plugin_call(int message, void *parameters) {
tmp,
sizeof(tmp),
msg->pluginSharedRW->sha3,
chainConfig);
chainConfig->chainId);
// Copy back the string to the global variable.
strlcpy(context->deposit_address, tmp, ETH2_DEPOSIT_PUBKEY_LENGTH);

View File

@@ -340,7 +340,7 @@ void starkware_print_asset_contract(char *destination, size_t destinationLength)
destination,
destinationLength,
&global_sha3,
chainConfig);
chainConfig->chainId);
} else {
strlcpy(destination, "UNKNOWN", destinationLength);
}
@@ -364,7 +364,7 @@ void starkware_get_source_address(char *destination) {
io_seproxyhal_io_heartbeat();
destination[0] = '0';
destination[1] = 'x';
getEthAddressStringFromKey(&publicKey, destination + 2, &global_sha3, chainConfig);
getEthAddressStringFromKey(&publicKey, destination + 2, &global_sha3, chainConfig->chainId);
destination[42] = '\0';
}
@@ -704,7 +704,7 @@ void starkware_plugin_call(int message, void *parameters) {
msg->msg,
msg->msgLength,
&global_sha3,
chainConfig);
chainConfig->chainId);
}
msg->result = ETH_PLUGIN_RESULT_OK;
break;
@@ -718,7 +718,7 @@ void starkware_plugin_call(int message, void *parameters) {
msg->msg,
msg->msgLength,
&global_sha3,
chainConfig);
chainConfig->chainId);
break;
case STARKWARE_ESCAPE:
strlcpy(msg->title, "Amount", msg->titleLength);
@@ -786,7 +786,7 @@ void starkware_plugin_call(int message, void *parameters) {
msg->msg,
msg->msgLength,
&global_sha3,
chainConfig);
chainConfig->chainId);
break;
case STARKWARE_WITHDRAW_AND_MINT:
strlcpy(msg->title, "Asset Contract", msg->titleLength);