Removed chain ID restrictions from SET_PLUGIN and PROVIDE_NFT_INFORMATION apdus
This commit is contained in:
@@ -169,13 +169,13 @@ void handleSetPlugin(uint8_t p1,
|
||||
PRINTF("Selector: %.*H\n", SELECTOR_SIZE, tokenContext->methodSelector);
|
||||
offset += SELECTOR_SIZE;
|
||||
|
||||
uint64_t chainId = u64_from_BE(workBuffer + offset, CHAIN_ID_SIZE);
|
||||
uint64_t chain_id = u64_from_BE(workBuffer + offset, CHAIN_ID_SIZE);
|
||||
// this prints raw data, so to have a more meaningful print, display
|
||||
// the buffer before the endianness swap
|
||||
PRINTF("ChainID: %.*H\n", sizeof(chainId), (workBuffer + offset));
|
||||
if ((chainConfig->chainId != 0) && (chainConfig->chainId != chainId)) {
|
||||
PRINTF("Chain ID token mismatch\n");
|
||||
THROW(0x6A80);
|
||||
PRINTF("ChainID: %.*H\n", sizeof(chain_id), (workBuffer + offset));
|
||||
if (!chain_is_ethereum_compatible(&chain_id)) {
|
||||
PRINTF("Unsupported chain ID!\n");
|
||||
THROW(APDU_RESPONSE_INVALID_DATA);
|
||||
}
|
||||
offset += CHAIN_ID_SIZE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user