What changed, and why it matters
This commit only fixes spelling mistakes in source code comments and documentation strings. No executable code, logic, or security behavior was changed. It cannot be exploited and has no security impact.
No security action required. Treat as routine code-quality/maintenance cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff is a pure codespell pass: typo corrections in comments (e.g., ‘correpsonding’ → ‘corresponding’, ‘informations’ → ‘information’, ‘accordin’ → ‘according’, ‘sart’ → ‘start’, ‘nagative’ → ‘negative’, ‘rapresentation’ → ‘representation’, ‘reuse’ hyphenation, ‘insted’ → ‘instead’, ‘intialize’ → ‘initialize’, ‘amunt’ → ‘amount’) and removal of missing trailing newlines in three header files. No functional code, control flow, data structures, or cryptographic operations were modified.
Changed components
src/common/merkle.hsrc/common/wallet.hsrc/crypto.hsrc/handler/lib/policy.csrc/handler/lib/policy.hsrc/handler/lib/psbt_parse_rawtx.hsrc/handler/lib/stream_merkle_leaf_element.hsrc/handler/sign_psbt.csrc/ui/display_utils.hInspect captured patch +17 / −17
diff --git a/src/common/merkle.h b/src/common/merkle.h
index 27997a8..c1762e4 100644
--- a/src/common/merkle.h
+++ b/src/common/merkle.h
@@ -75,10 +75,10 @@ int merkle_get_ith_direction(size_t size, size_t index, size_t i);
/**
* Represents the Merkleized version of a key-value map, holding the number of elements, the root of
* the Merkle tree of the sorted list of keys, and the root of the Merkle tree of the values (sorted
- * by their correpsonding key).
+ * by their corresponding key).
*/
typedef struct {
uint64_t size;
uint8_t keys_root[32];
uint8_t values_root[32];
-} merkleized_map_commitment_t;
\ No newline at end of file
+} merkleized_map_commitment_t;
diff --git a/src/common/wallet.h b/src/common/wallet.h
index 1714805..edc8090 100644
--- a/src/common/wallet.h
+++ b/src/common/wallet.h
@@ -308,9 +308,9 @@ typedef enum {
// The compiler doesn't like /** inside a block comment, so we disable this warning temporarily.
/** Structure representing a key expression.
- * In V1, it's the index of a key in the key informations array, which includes the final /** step.
- * In V2, it's the index of a key in the key informations array, plus the two numbers a, b in the
- * /<NUM_a;NUM_b>/* derivation steps; here, the xpubs in the key informations array don't have extra
+ * In V1, it's the index of a key in the key information array, which includes the final /** step.
+ * In V2, it's the index of a key in the key information array, plus the two numbers a, b in the
+ * /<NUM_a;NUM_b>/* derivation steps; here, the xpubs in the key information array don't have extra
* derivation steps.
*/
#pragma GCC diagnostic pop
diff --git a/src/crypto.h b/src/crypto.h
index 4c41df0..1a694f9 100644
--- a/src/crypto.h
+++ b/src/crypto.h
@@ -329,7 +329,7 @@ bool crypto_derive_symmetric_key(const char *label, size_t label_len, uint8_t ke
int base58_encode_address(const uint8_t in[20], uint32_t version, char *out, size_t out_len);
/**
- * Signs a SHA-256 hash using the ECDSA with deterministic nonce accordin to RFC6979; the signing
+ * Signs a SHA-256 hash using the ECDSA with deterministic nonce according to RFC6979; the signing
* private key is the one derived at the given BIP-32 path. The signature is returned in the
* conventional DER encoding.
*
diff --git a/src/handler/lib/policy.c b/src/handler/lib/policy.c
index efae9ec..b8e9acc 100644
--- a/src/handler/lib/policy.c
+++ b/src/handler/lib/policy.c
@@ -417,7 +417,7 @@ execute_processor(policy_parser_state_t *state, policy_parser_processor_t proc,
// p2pkh ==> legacy address (start with 1 on mainnet, m or n on testnet)
// p2sh (also nested segwit) ==> legacy script (start with 3 on mainnet, 2 on testnet)
-// p2wpkh or p2wsh ==> bech32 (sart with bc1 on mainnet, tb1 on testnet)
+// p2wpkh or p2wsh ==> bech32 (start with bc1 on mainnet, tb1 on testnet)
// convenience function, split from get_derived_pubkey only to improve stack usage
// returns -1 on error, 0 if the returned key info has no wildcard (**), 1 if it has the wildcard
@@ -1163,7 +1163,7 @@ int get_wallet_script(dispatcher_context_t *dispatcher_context,
out[1] = 32; // PUSH 32 bytes
// uint8_t h[32];
- uint8_t *h = out + 2; // hack: re-use the output array to save memory
+ uint8_t *h = out + 2; // hack: reuse the output array to save memory
int h_length = 0;
if (!isnull_policy_node_tree(&tr_policy->tree)) {
diff --git a/src/handler/lib/policy.h b/src/handler/lib/policy.h
index 9e01cda..9c974a6 100644
--- a/src/handler/lib/policy.h
+++ b/src/handler/lib/policy.h
@@ -21,7 +21,7 @@
* @param policy_map_bytes Pointer to an array of bytes that will be used for the parsed abstract
* syntax tree
* @param policy_map_bytes_len Length of policy_map_bytes in bytes.
- * @return The memory size of the parsed descriotor template on success, a negative number in case
+ * @return The memory size of the parsed descriptor template on success, a negative number in case
* of error.
*/
// TODO: we should distinguish actual errors from just "policy too big to fit in memory"
@@ -46,7 +46,7 @@ typedef struct {
int wallet_version; // The wallet policy version, either WALLET_POLICY_VERSION_V1 or
// WALLET_POLICY_VERSION_V2
const uint8_t
- *keys_merkle_root; // The Merkle root of the tree of key informations in the policy
+ *keys_merkle_root; // The Merkle root of the tree of key information in the policy
uint32_t n_keys; // The number of key information elements in the policy
size_t address_index; // The address index to use in the derivation
bool change; // whether a change address or a receive address is derived
@@ -249,4 +249,4 @@ __attribute__((warn_unused_result)) int is_policy_sane(dispatcher_context_t *dis
const policy_node_t *policy,
int wallet_version,
const uint8_t keys_merkle_root[static 32],
- uint32_t n_keys);
\ No newline at end of file
+ uint32_t n_keys);
diff --git a/src/handler/lib/psbt_parse_rawtx.h b/src/handler/lib/psbt_parse_rawtx.h
index dbd67e6..0f60fc2 100644
--- a/src/handler/lib/psbt_parse_rawtx.h
+++ b/src/handler/lib/psbt_parse_rawtx.h
@@ -14,7 +14,7 @@ typedef struct {
/**
* Given a commitment to a merkleized map and a key, this flow parses it as a serialized bitcoin
- * transaction, computes the transaction id and optionally keeps track of the vout amunt and
+ * transaction, computes the transaction id and optionally keeps track of the vout amount and
* scriptPubkey of one of the outputs.
*/
int call_psbt_parse_rawtx(dispatcher_context_t *dispatcher_context,
diff --git a/src/handler/lib/stream_merkle_leaf_element.h b/src/handler/lib/stream_merkle_leaf_element.h
index 8704499..0331606 100644
--- a/src/handler/lib/stream_merkle_leaf_element.h
+++ b/src/handler/lib/stream_merkle_leaf_element.h
@@ -9,7 +9,7 @@
* by its index. If len_callback is not NONE, it is called before the other callback with the length
* of the preimage (not including the 0x00 prefix).
*
- * Returns a nagative number on failure, or the preimage length on success.
+ * Returns a negative number on failure, or the preimage length on success.
*/
int call_stream_merkle_leaf_element(dispatcher_context_t *dispatcher_context,
const uint8_t merkle_root[static 32],
@@ -17,4 +17,4 @@ int call_stream_merkle_leaf_element(dispatcher_context_t *dispatcher_context,
uint32_t leaf_index,
void (*len_callback)(size_t, void *),
void (*callback)(buffer_t *, void *),
- void *callback_state);
\ No newline at end of file
+ void *callback_state);
diff --git a/src/handler/sign_psbt.c b/src/handler/sign_psbt.c
index 1bc017c..9c8812d 100644
--- a/src/handler/sign_psbt.c
+++ b/src/handler/sign_psbt.c
@@ -1092,7 +1092,7 @@ execute_swap_checks(dispatcher_context_t *dc, sign_psbt_state_t *st) {
data_size = second_byte;
} else if (second_byte == OP_PUSHDATA1) {
// pushing more than 75 bytes requires using OP_PUSHDATA1 <len>
- // insted of a single-byte opcode
+ // instead of a single-byte opcode
push_opcode_size = 2;
data_size = opreturn_script[2];
} else {
@@ -2106,7 +2106,7 @@ void handler_sign_psbt(dispatcher_context_t *dc, uint8_t protocol_version) {
st.protocol_version = protocol_version;
- // read APDU inputs, intialize global state and read global PSBT map
+ // read APDU inputs, initialize global state and read global PSBT map
if (!init_global_state(dc, &st)) return;
sign_psbt_cache_t *cache = &G_sign_psbt_cache;
diff --git a/src/ui/display_utils.h b/src/ui/display_utils.h
index 087b445..01aac52 100644
--- a/src/ui/display_utils.h
+++ b/src/ui/display_utils.h
@@ -9,7 +9,7 @@
#define MAX_AMOUNT_LENGTH (5 + 1 + 20 + 1)
/**
- * Converts a 64-bits unsigned integer into a decimal rapresentation, where the `amount` is a
+ * Converts a 64-bits unsigned integer into a decimal representation, where the `amount` is a
* multiple of 1/100_000_000th. Trailing decimal zeros are not appended (and no decimal point is
* present if the `amount` is a multiple of 100_000_000). The resulting string is prefixed with a
* ticker name (up to 5 characters long), followed by a space.
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.