WIP integration in app
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
#define INS_PROVIDE_NFT_INFORMATION 0x14
|
||||
#define INS_SET_PLUGIN 0x16
|
||||
#define INS_PERFORM_PRIVACY_OPERATION 0x18
|
||||
#define INS_EIP712_STRUCT_DEF 0x1A
|
||||
#define INS_EIP712_STRUCT_IMPL 0x1C
|
||||
#define P1_CONFIRM 0x01
|
||||
#define P1_NON_CONFIRM 0x00
|
||||
#define P2_NO_CHAINCODE 0x00
|
||||
@@ -168,4 +170,7 @@ void handleStarkwareUnsafeSign(uint8_t p1,
|
||||
|
||||
#endif
|
||||
|
||||
bool handle_eip712_struct_def(const uint8_t *const apdu_buf);
|
||||
bool handle_eip712_struct_impl(const uint8_t *const apdu_buf);
|
||||
|
||||
#endif // _APDU_CONSTANTS_H_
|
||||
|
||||
10
src/main.c
10
src/main.c
@@ -29,6 +29,7 @@
|
||||
#include "handle_swap_sign_transaction.h"
|
||||
#include "handle_get_printable_amount.h"
|
||||
#include "handle_check_address.h"
|
||||
#include "mem.h"
|
||||
|
||||
#ifdef HAVE_STARKWARE
|
||||
#include "stark_crypto.h"
|
||||
@@ -694,6 +695,14 @@ void handleApdu(unsigned int *flags, unsigned int *tx) {
|
||||
|
||||
#endif
|
||||
|
||||
case INS_EIP712_STRUCT_DEF:
|
||||
handle_eip712_struct_def(G_io_apdu_buffer);
|
||||
break;
|
||||
|
||||
case INS_EIP712_STRUCT_IMPL:
|
||||
handle_eip712_struct_impl(G_io_apdu_buffer);
|
||||
break;
|
||||
|
||||
#if 0
|
||||
case 0xFF: // return to dashboard
|
||||
goto return_to_dashboard;
|
||||
@@ -884,6 +893,7 @@ void coin_main(chain_config_t *coin_config) {
|
||||
}
|
||||
reset_app_context();
|
||||
tmpCtx.transactionContext.currentItemIndex = 0;
|
||||
mem_init();
|
||||
|
||||
for (;;) {
|
||||
UX_INIT();
|
||||
|
||||
Reference in New Issue
Block a user