Skip to content

Commit

Permalink
Limit compilation of NFT_ID in trusted name if HAVE_NFT_SUPPORT
Browse files Browse the repository at this point in the history
  • Loading branch information
apaillier-ledger committed Feb 25, 2025
1 parent 1f438d1 commit df08dd2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src_features/provide_trusted_name/trusted_name.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ static bool handle_trusted_name_source(const s_tlv_data *data, s_trusted_name_ct
return true;
}

#ifdef HAVE_NFT_SUPPORT
/**
* Handler for tag \ref NFT_ID
*
Expand All @@ -452,6 +453,7 @@ static bool handle_nft_id(const s_tlv_data *data, s_trusted_name_ctx *context) {
context->rcv_flags |= SET_BIT(NFT_ID_RCV_BIT);
return true; // unhandled for now
}
#endif

bool handle_trusted_name_struct(const s_tlv_data *data, s_trusted_name_ctx *context) {
bool ret;
Expand Down Expand Up @@ -497,9 +499,11 @@ bool handle_trusted_name_struct(const s_tlv_data *data, s_trusted_name_ctx *cont
case TRUSTED_NAME_SOURCE:
ret = handle_trusted_name_source(data, context);
break;
#ifdef HAVE_NFT_SUPPORT
case NFT_ID:
ret = handle_nft_id(data, context);
break;
#endif
default:
PRINTF(TLV_TAG_ERROR_MSG, data->tag);
ret = false;
Expand Down
2 changes: 2 additions & 0 deletions src_features/provide_trusted_name/trusted_name.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ typedef struct {
uint64_t chain_id;
e_name_type name_type;
e_name_source name_source;
#ifdef HAVE_NFT_SUPPORT
uint8_t nft_id[INT256_LENGTH];
#endif
} s_trusted_name_info;

typedef struct {
Expand Down

0 comments on commit df08dd2

Please sign in to comment.