Add ETH 2 deposit handling

This commit is contained in:
BTChip github
2020-10-27 11:16:50 +01:00
committed by TamtamHero
parent 832294334f
commit 7e53de8897
17 changed files with 544 additions and 14 deletions

View File

@@ -0,0 +1,23 @@
#ifdef HAVE_ETH2
#include "shared_context.h"
#include "apdu_constants.h"
void handleSetEth2WithdrawalIndex(uint8_t p1, uint8_t p2, uint8_t *dataBuffer, uint16_t dataLength, unsigned int *flags, unsigned int *tx) {
UNUSED(dataLength);
if (dataLength != 4) {
THROW(0x6700);
}
if ((p1 != 0) || (p2 != 0)) {
THROW(0x6B00);
}
eth2WithdrawalIndex = U4BE(dataBuffer, 0);
THROW(0x9000);
}
#endif