Skip to content

Commit

Permalink
fix(core): Review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
amanCypherock committed Dec 15, 2023
1 parent 371e5bd commit c236915
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/wallet/reconstruct_wallet_flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,14 @@ static const char *reconstruct_wallet(const uint8_t *wallet_id,
*
* @param secret A pointer to an array of uint8_t, which represents the secret
* data used to generate the mnemonics.
* @param wallet_id The `wallet_id` parameter is a pointer to a constant array
* of `uint8_t` (unsigned 8-bit integers). wallet_id is compared against the
* wallet id generated from mnemonics, if same wallet id is generated, then
* wallet is verified.
* @param wallet_id A pointer to an array uint8_t with wallet id, wallet_id is
* compared against the wallet id generated from mnemonics, if same wallet id is
* generated, then wallet is verified.
*
* @return a pointer to a constant character mnemonics string (const char *).
*/
static const char *generate_mnemonics_and_verify_wallet(
uint8_t *secret,
const uint8_t *secret,
const uint8_t *wallet_id);

/*****************************************************************************
Expand Down Expand Up @@ -315,7 +314,7 @@ static reconstruct_state_e reconstruct_wallet_handler(reconstruct_state_e state,
}

static const char *generate_mnemonics_and_verify_wallet(
uint8_t *secret,
const uint8_t *secret,
const uint8_t *wallet_id) {
const char *mnemonics =
mnemonic_from_data(secret, wallet.number_of_mnemonics * 4 / 3);
Expand Down Expand Up @@ -367,6 +366,7 @@ static const char *reconstruct_wallet(const uint8_t *wallet_id,
ERROR_USER_REJECTION_CONFIRMATION);
}

memzero(secret, sizeof(secret));
return mnemonics;
}

Expand Down

0 comments on commit c236915

Please sign in to comment.