Rename utils to common_utils
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "ethUstream.h"
|
||||
#include "rlp_utils.h"
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
|
||||
#define MAX_INT256 32
|
||||
#define MAX_ADDRESS 20
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "os.h"
|
||||
#include "cx.h"
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
#include "tx_content.h"
|
||||
|
||||
struct txContext_t;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "swap_utils.h"
|
||||
#include "handle_get_printable_amount.h"
|
||||
#include "shared_context.h"
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
#include "uint256.h"
|
||||
#include "string.h"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "swap_utils.h"
|
||||
#include "handle_swap_sign_transaction.h"
|
||||
#include "shared_context.h"
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
#ifdef HAVE_NBGL
|
||||
#include "nbgl_use_case.h"
|
||||
#endif // HAVE_NBGL
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "os_io_seproxyhal.h"
|
||||
|
||||
#include "glyphs.h"
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
|
||||
#include "swap_lib_calls.h"
|
||||
#include "handle_swap_sign_transaction.h"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "os_pic.h"
|
||||
#include "network.h"
|
||||
#include "shared_context.h"
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
|
||||
typedef struct network_info_s {
|
||||
const char *name;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "shared_context.h"
|
||||
#include "stark_utils.h"
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
|
||||
extraInfo_t *getKnownToken(uint8_t *contractAddress);
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <string.h>
|
||||
#include "uint128.h"
|
||||
#include "uint_common.h"
|
||||
#include "utils.h" // HEXDIGITS
|
||||
#include "common_utils.h" // HEXDIGITS
|
||||
|
||||
void readu128BE(const uint8_t *const buffer, uint128_t *const target) {
|
||||
UPPER_P(target) = readUint64BE(buffer);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "shared_context.h"
|
||||
#include "ui_callbacks.h"
|
||||
#include "common_ui.h"
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
|
||||
#define ENABLED_STR "Enabled"
|
||||
#define DISABLED_STR "Disabled"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "shared_context.h"
|
||||
#include "ui_callbacks.h"
|
||||
#include "chainConfig.h"
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
#include "feature_signTx.h"
|
||||
#include "network.h"
|
||||
#include "eth_plugin_handler.h"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "uint128.h"
|
||||
#include "uint256.h"
|
||||
#include "tokens.h"
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
|
||||
void array_hexstr(char *strbuf, const void *bin, unsigned int len) {
|
||||
while (len--) {
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
#include "plugin_utils.h"
|
||||
|
||||
void copy_address(uint8_t* dst, const uint8_t* parameter, uint8_t dst_size) {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
|
||||
#define MAX_TICKER_LEN 11 // 10 characters + '\0'
|
||||
#define MAX_ITEMS 2
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "os.h"
|
||||
#include "cx.h"
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
|
||||
typedef struct txInt256_t {
|
||||
uint8_t value[INT256_LENGTH];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "shared_context.h"
|
||||
#include "apdu_constants.h"
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
#include "feature_getPublicKey.h"
|
||||
#include "common_ui.h"
|
||||
#include "os_io_seproxyhal.h"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include "utils.h" // ARRAY_SIZE
|
||||
#include "common_utils.h" // ARRAY_SIZE
|
||||
#include "apdu_constants.h"
|
||||
#include "domain_name.h"
|
||||
#include "challenge.h"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "shared_context.h"
|
||||
#include "apdu_constants.h"
|
||||
#include "tokens.h"
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
#include "common_ui.h"
|
||||
#include "os_io_seproxyhal.h"
|
||||
#include "network.h"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "eth_plugin_interface.h"
|
||||
#include "eth_plugin_internal.h"
|
||||
#include "plugin_utils.h"
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
#include "common_ui.h"
|
||||
#include "os_io_seproxyhal.h"
|
||||
#include "network.h"
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "shared_context.h"
|
||||
#include "ui_logic.h"
|
||||
#include "context_712.h" // contract_addr
|
||||
#include "utils.h" // u64_from_BE
|
||||
#include "common_utils.h" // u64_from_BE
|
||||
#include "apdu_constants.h" // APDU response codes
|
||||
#include "typed_data.h"
|
||||
#include "commands_712.h"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "os_pic.h"
|
||||
#include "apdu_constants.h" // APDU response codes
|
||||
#include "typed_data.h"
|
||||
#include "utils.h" // ARRAY_SIZE
|
||||
#include "common_utils.h" // ARRAY_SIZE
|
||||
|
||||
// Bit indicating they are more types associated to this typename
|
||||
#define TYPENAME_MORE_TYPE (1 << 7)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "mem_utils.h"
|
||||
#include "os_io.h"
|
||||
#include "shared_context.h"
|
||||
#include "utils.h" // uint256_to_decimal
|
||||
#include "common_utils.h" // uint256_to_decimal
|
||||
#include "common_712.h"
|
||||
#include "context_712.h" // eip712_context_deinit
|
||||
#include "uint256.h" // tostring256 && tostring256_signed
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "shared_context.h"
|
||||
#include "apdu_constants.h"
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
#include "common_ui.h"
|
||||
#include "common_712.h"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <ctype.h>
|
||||
#include "shared_context.h"
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
#include "feature_signTx.h"
|
||||
#ifdef HAVE_STARKWARE
|
||||
#include "stark_utils.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "lib_standard_app/crypto_helpers.h"
|
||||
#include "os_io_seproxyhal.h"
|
||||
#include "shared_context.h"
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
#include "common_ui.h"
|
||||
#include "handle_swap_sign_transaction.h"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "erc1155_plugin.h"
|
||||
#include "plugin_utils.h"
|
||||
#include "eth_plugin_internal.h"
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
|
||||
static void handle_safe_transfer(ethPluginProvideParameter_t *msg, erc1155_context_t *context) {
|
||||
uint8_t new_value[INT256_LENGTH];
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "erc1155_plugin.h"
|
||||
#include "eth_plugin_internal.h"
|
||||
#include "eth_plugin_interface.h"
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
|
||||
static void set_approval_for_all_ui(ethQueryContractUI_t *msg, erc1155_context_t *context) {
|
||||
switch (msg->screenIndex) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "shared_context.h"
|
||||
#include "plugin_utils.h"
|
||||
#include "ethUstream.h"
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
|
||||
typedef enum { ERC20_TRANSFER = 0, ERC20_APPROVE } erc20Selector_t;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "erc721_plugin.h"
|
||||
#include "eth_plugin_internal.h"
|
||||
#include "eth_plugin_interface.h"
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
|
||||
static void set_approval_ui(ethQueryContractUI_t *msg, erc721_context_t *context) {
|
||||
switch (msg->screenIndex) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "eth_plugin_internal.h"
|
||||
#include "eth_plugin_handler.h"
|
||||
#include "shared_context.h"
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
|
||||
void getEth2PublicKey(uint32_t *bip32Path, uint8_t bip32PathLength, uint8_t *out);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "eth_plugin_internal.h" // TODO : rewrite as independant code
|
||||
#include "stark_utils.h"
|
||||
#include "plugin_utils.h"
|
||||
#include "utils.h"
|
||||
#include "common_utils.h"
|
||||
#include "apdu_constants.h"
|
||||
|
||||
#ifdef HAVE_STARKWARE
|
||||
|
||||
@@ -155,7 +155,7 @@ if __name__ == "__main__":
|
||||
# one, copied to sdk
|
||||
headers_to_merge = [
|
||||
"src_common/tokens.h",
|
||||
"src_common/utils.h",
|
||||
"src_common/common_utils.h",
|
||||
"src_common/tx_content.h",
|
||||
"src_common/plugin_utils.h",
|
||||
"src_common/nft.h",
|
||||
@@ -199,7 +199,7 @@ if __name__ == "__main__":
|
||||
|
||||
# extract and merge function bodies
|
||||
c_files_to_merge = [
|
||||
"src_common/utils.c",
|
||||
"src_common/common_utils.c",
|
||||
"src_common/plugin_utils.c",
|
||||
]
|
||||
merge_c_files(c_files_to_merge, nodes_to_extract["fn"])
|
||||
|
||||
Reference in New Issue
Block a user