Skip to content

Commit f08bfe4

Browse files
feat: Add exchange address verification
Signed-off-by: Prashant Rahul <prashantrahul141@protonmail.com>
1 parent 1f46bf8 commit f08bfe4

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

apps/cardano_app/cardano_txn.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ static bool fetch_valid_transaction(cardano_query_t *query) {
576576
static bool get_user_verification() {
577577
/* verify amount, addr for each receipt */
578578
char to_address[CARDANO_PAYMENT_ADDR_LENGTH + 1] = {0};
579+
memzero(to_address, sizeof(to_address));
579580

580581
for (size_t output_i = 0;
581582
output_i < cardano_txn_context->parsed_txn.outputs_count;
@@ -584,6 +585,13 @@ static bool get_user_verification() {
584585
cardano_txn_context->parsed_txn.outputs[output_i].receiver_addr,
585586
CARDANO_PAYMENT_ADDR_LENGTH);
586587

588+
/* exchange address verification */
589+
if (use_signature_verification) {
590+
if (!exchange_validate_stored_signature(to_address, sizeof(to_address))) {
591+
return false;
592+
}
593+
}
594+
587595
if (!core_scroll_page(
588596
ui_text_verify_address, to_address, cardano_send_error)) {
589597
return false;

0 commit comments

Comments
 (0)