Skip to content

Commit

Permalink
remove variable & add test assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
AdoAdoAdo committed Jul 11, 2024
1 parent 52b362f commit b8fe4be
Show file tree
Hide file tree
Showing 2 changed files with 144 additions and 133 deletions.
5 changes: 2 additions & 3 deletions src/sign_tx_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,18 @@ static bool sign_tx_hash(uint8_t *data_buffer) {
cx_ecfp_private_key_t private_key;
bool success = true;
int ret_code = 0;
int err;

if (!get_private_key(bip32_account, bip32_address_index, &private_key)) {
return false;
}

err = cx_hash_no_throw((cx_hash_t *) &sha3_context,
ret_code = cx_hash_no_throw((cx_hash_t *) &sha3_context,
CX_LAST,
data_buffer,
0,
tx_hash_context.hash,
32);
if (err != CX_OK) {
if (ret_code != CX_OK) {
success = false;
}
ret_code = cx_eddsa_sign_no_throw(&private_key,
Expand Down
Loading

0 comments on commit b8fe4be

Please sign in to comment.