Skip to content

Commit

Permalink
Make sure to return an error if a Thorchain swap is attempted on Nano S
Browse files Browse the repository at this point in the history
  • Loading branch information
bigspider committed Oct 28, 2024
1 parent 0f7f826 commit 005cf5c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/process_transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,13 @@ static bool check_extra_id_extra_data(subcommand_e subcommand) {
}

if (has_extra_data) {
#ifdef TARGET_NANOS
// We make sure that we return an error on Nano S, if a payin_extra_data is provided.
// Nano S does not support Thorchain.
PRINTF("Error: payin_extra_data is not supported on Nano S.\n");
return false;
#endif

// Size has to be header + 32 bytes hash
if (extra->size != 33) {
PRINTF("Error: incorrect payin_extra_data size %d != 33; payin_extra_data = %.*H\n",
Expand Down

0 comments on commit 005cf5c

Please sign in to comment.