mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-05-28 11:48:45 +00:00
build(legacy): fix legacy build
[no changelog]
This commit is contained in:
parent
17990e1c80
commit
4422a80f34
@ -144,7 +144,7 @@ OBJS += protob/messages-management.pb.o
|
||||
ifneq ($(BITCOIN_ONLY),1)
|
||||
OBJS += ../vendor/trezor-crypto/cash_addr.o
|
||||
OBJS += protob/messages-ethereum.pb.o
|
||||
OBJS += protob/messages-ethereum-definitions.pb.o
|
||||
OBJS += protob/messages-definitions.pb.o
|
||||
OBJS += protob/messages-nem.pb.o
|
||||
OBJS += protob/messages-stellar.pb.o
|
||||
endif
|
||||
|
@ -126,7 +126,7 @@ static bool parse_encoded_definition(struct EncodedDefinition *const result,
|
||||
}
|
||||
|
||||
static bool decode_definition(const pb_size_t size, const pb_byte_t *bytes,
|
||||
const EthereumDefinitionType expected_type,
|
||||
const DefinitionType expected_type,
|
||||
void *definition) {
|
||||
// parse received definition
|
||||
static struct EncodedDefinition parsed_def;
|
||||
@ -201,7 +201,7 @@ static bool decode_definition(const pb_size_t size, const pb_byte_t *bytes,
|
||||
}
|
||||
|
||||
// decode message
|
||||
const pb_msgdesc_t *fields = (expected_type == EthereumDefinitionType_NETWORK
|
||||
const pb_msgdesc_t *fields = (expected_type == DefinitionType_ETHEREUM_NETWORK
|
||||
? EthereumNetworkInfo_fields
|
||||
: EthereumTokenInfo_fields);
|
||||
pb_istream_t stream =
|
||||
@ -244,7 +244,7 @@ static const EthereumNetworkInfo *get_network(
|
||||
// if we still do not have any network definition try to decode received data
|
||||
memzero(&decoded_network, sizeof(decoded_network));
|
||||
if (!decode_definition(encoded_network->size, encoded_network->bytes,
|
||||
EthereumDefinitionType_NETWORK, &decoded_network)) {
|
||||
DefinitionType_ETHEREUM_NETWORK, &decoded_network)) {
|
||||
// error already sent by decode_definition
|
||||
return NULL;
|
||||
}
|
||||
@ -292,7 +292,7 @@ static const EthereumTokenInfo *get_token(const EncodedToken *encoded_token,
|
||||
// try to decode received definition
|
||||
memzero(&decoded_token, sizeof(decoded_token));
|
||||
if (!decode_definition(encoded_token->size, encoded_token->bytes,
|
||||
EthereumDefinitionType_TOKEN, &decoded_token)) {
|
||||
DefinitionType_ETHEREUM_TOKEN, &decoded_token)) {
|
||||
// error already sent by decode_definition
|
||||
return NULL;
|
||||
}
|
||||
|
@ -20,7 +20,8 @@
|
||||
#ifndef __ETHEREUM_DEFINITIONS_H__
|
||||
#define __ETHEREUM_DEFINITIONS_H__
|
||||
|
||||
#include "messages-ethereum-definitions.pb.h"
|
||||
#include "messages-definitions.pb.h"
|
||||
#include "messages-ethereum.pb.h"
|
||||
|
||||
typedef EthereumDefinitions_encoded_network_t EncodedNetwork;
|
||||
typedef EthereumDefinitions_encoded_token_t EncodedToken;
|
||||
|
@ -7,10 +7,9 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include "crypto.h"
|
||||
#include "messages-ethereum-definitions.pb.h"
|
||||
#include "pb.h"
|
||||
|
||||
#define MIN_DATA_VERSION ${ethereum_defs_timestamp}
|
||||
#define MIN_DATA_VERSION ${defs_timestamp}
|
||||
#define FORMAT_VERSION_LENGTH 5
|
||||
#define FORMAT_VERSION (const pb_byte_t *)"trzd1"
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "messages-ethereum-definitions.pb.h"
|
||||
#include "messages-definitions.pb.h"
|
||||
|
||||
extern const EthereumNetworkInfo UNKNOWN_NETWORK;
|
||||
#define SLIP44_UNKNOWN UINT32_MAX
|
||||
|
@ -21,7 +21,7 @@ SKIPPED_MESSAGES += Ethereum NEM Stellar
|
||||
endif
|
||||
|
||||
PROTO_NAMES = messages messages-bitcoin messages-common messages-crypto messages-debug \
|
||||
messages-ethereum messages-ethereum-definitions messages-management messages-nem \
|
||||
messages-ethereum messages-definitions messages-management messages-nem \
|
||||
messages-stellar options
|
||||
|
||||
PROTO_OPTIONS = $(PROTO_NAMES:=.options)
|
||||
|
@ -5,5 +5,6 @@ EthereumTokenInfo.name max_size:256
|
||||
EthereumTokenInfo.address max_size:20
|
||||
EthereumTokenInfo.symbol max_size:256
|
||||
|
||||
EthereumDefinitions.encoded_network max_size:1024
|
||||
EthereumDefinitions.encoded_token max_size:1024
|
||||
SolanaTokenInfo.name type:FT_IGNORE
|
||||
SolanaTokenInfo.mint type:FT_IGNORE
|
||||
SolanaTokenInfo.symbol type:FT_IGNORE
|
1
legacy/firmware/protob/messages-definitions.proto
Symbolic link
1
legacy/firmware/protob/messages-definitions.proto
Symbolic link
@ -0,0 +1 @@
|
||||
../../vendor/trezor-common/protob/messages-definitions.proto
|
@ -1 +0,0 @@
|
||||
../../vendor/trezor-common/protob/messages-ethereum-definitions.proto
|
@ -51,3 +51,6 @@ EthereumGetPublicKey.address_n max_count:8
|
||||
EthereumAddress._old_address max_size:20
|
||||
EthereumAddress.address max_size:43
|
||||
EthereumPublicKey.xpub max_size:113
|
||||
|
||||
EthereumDefinitions.encoded_network max_size:1024
|
||||
EthereumDefinitions.encoded_token max_size:1024
|
||||
|
Loading…
Reference in New Issue
Block a user