2020-10-27 11:16:50 +01:00
|
|
|
#ifdef HAVE_ETH2
|
|
|
|
|
|
|
|
|
|
#include "shared_context.h"
|
|
|
|
|
#include "apdu_constants.h"
|
|
|
|
|
|
2020-12-01 16:20:13 +01:00
|
|
|
void handleSetEth2WithdrawalIndex(uint8_t p1,
|
|
|
|
|
uint8_t p2,
|
2022-07-15 12:33:19 +02:00
|
|
|
const uint8_t *dataBuffer,
|
2020-12-01 16:20:13 +01:00
|
|
|
uint16_t dataLength,
|
2021-07-05 11:01:51 +02:00
|
|
|
__attribute__((unused)) unsigned int *flags,
|
|
|
|
|
__attribute__((unused)) unsigned int *tx) {
|
2020-12-01 16:20:13 +01:00
|
|
|
if (dataLength != 4) {
|
|
|
|
|
THROW(0x6700);
|
|
|
|
|
}
|
2020-10-27 11:16:50 +01:00
|
|
|
|
2020-12-01 16:20:13 +01:00
|
|
|
if ((p1 != 0) || (p2 != 0)) {
|
|
|
|
|
THROW(0x6B00);
|
|
|
|
|
}
|
2020-10-27 11:16:50 +01:00
|
|
|
|
2020-12-01 16:20:13 +01:00
|
|
|
eth2WithdrawalIndex = U4BE(dataBuffer, 0);
|
2020-10-27 11:16:50 +01:00
|
|
|
|
2020-12-01 16:20:13 +01:00
|
|
|
THROW(0x9000);
|
2020-10-27 11:16:50 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|