What changed, and why it matters
This commit is a large typo-fixing cleanup across 40 files. Almost every change corrects spelling mistakes in code comments, variable names, or user-facing text strings. There is no change to program logic, security behavior, or cryptographic handling. The only user-visible change is correcting the error message 'User abandonded pin entry' to 'User abandoned pin entry'.
No security action needed; this is a non-functional documentation/typo cleanup. Treat as a normal code-quality merge.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff is a pure consistency/typo patch: +96/-96 lines across 40 files, with no functional code modifications. Examples include comment spelling corrections (‘continously’ → ‘continuously’, ‘recusively’ → ‘recursively’, ‘initally’ → ‘initially’), local variable renames (‘num_multsig_names’ → ‘num_multisig_names’), and one corrected RPC error string in main/process/auth_user.c. No control flow, parsing, crypto, memory management, or authorization logic is altered.
Changed components
main/process/auth_user.c (user-visible error string only)main/display_hw.cmain/gui.cmain/gui.hmain/identity.cmain/idletimer.cmain/jade_abort.cmain/keychain.cmain/multisig.cmain/otpauth.cmain/process.cmain/process.hmain/process/dashboard.cmain/process/debug_clean.cmain/process/mnemonic.cmain/process/ota_util.cmain/process/pinclient.cmain/process/process_utils.cmain/process/register_descriptor.cmain/process/register_multisig.cmain/process/register_otp.cmain/process/sign_psbt.cmain/process/sign_utils.cmain/qrmode.cmain/qrscan.cmain/selfcheck.cmain/signer.cmain/smoketest.cmain/storage.cmain/ui/dashboard.cmain/ui/descriptor.cmain/ui/dialogs.cmain/ui/mnemonic.cmain/ui/multisig.cmain/ui/sign_message.cmain/ui/sign_tx.cmain/ui/signer.cmain/utils/address.cmain/wifi.cjadepy/jade.pyInspect captured patch +96 / −96
### jadepy/jade.py
@@ -959,7 +959,7 @@ def get_registered_multisig(self, multisig_name, as_file=False):
Parameters
----------
multisig_name : string
- Name of multsig registration record to return.
+ Name of multisig registration record to return.
as_file : string, optional
If true the flat file format is returned, otherwise structured json is returned.
### main/display_hw.c
@@ -334,7 +334,7 @@ void display_hw_draw_rect(int x, int y, int w, int h, const uint16_t color)
const bool can_double = !(((intptr_t)screen_ptr) % 4) && !(w % 2);
if ((!calculatedx && w == CONFIG_DISPLAY_WIDTH)) {
- // Full display width. Write continously for a small speedup
+ // Full display width. Write continuously for a small speedup
if (can_memset) {
jmemset(screen_ptr, color, CONFIG_DISPLAY_WIDTH * h * sizeof(color_t));
} else {
### main/gui.c
@@ -898,7 +898,7 @@ void gui_chain_activities(const link_activity_t* link_act, linked_activities_inf
pActInfo->last_activity_next_button = link_act->next_button;
}
-// attach a view node (recusively) to an activity, by inheriting the activity from the parent
+// attach a view node (recursively) to an activity, by inheriting the activity from the parent
static void set_tree_activity(gui_view_node_t* node)
{
JADE_ASSERT(node);
@@ -2456,7 +2456,7 @@ static size_t handle_gui_input_queue(bool* switched_activities)
while ((job = xRingbufferReceive(gui_input_queue, &item_size, 10 / portTICK_PERIOD_MS))) {
JADE_ASSERT(item_size == sizeof(gui_task_job_t));
- // A job can be be ONE of the following:
+ // A job can be ONE of the following:
// - repainting a node, OR
// - moving to another activity and optionally freeing other activities
activity_holder_t* to_free = job->to_free;
@@ -2870,7 +2870,7 @@ void gui_touch_update(const uint16_t x, const uint16_t y, const bool is_pressed)
}
#endif // CONFIG_DISPLAY_TOUCH_DIRECT
-// Set the item to be initally selected when the activity is activated/switched-to
+// Set the item to be initially selected when the activity is activated/switched-to
// 'node' can be NULL to unset any specific initial selection
void gui_set_activity_initial_selection(gui_view_node_t* node)
{
@@ -2888,7 +2888,7 @@ static void gui_post(const gui_task_job_t* task, const char* task_name)
// Post a node to the gui task to be repainted
// Should ultimately result in a call to repaint_node() from the gui_task.
-// This ensures all calls to the undlerying display driver come from the gui_task
+// This ensures all calls to the underlying display driver come from the gui_task
// and are serialised, such that no mutexing should be required.
void gui_repaint(gui_view_node_t* node)
{
@@ -3035,7 +3035,7 @@ void gui_activity_register_event(
}
// Registers an event handler, then blocks waiting for it to fire. A timeout can be passed.
-// Returns true if the event fires, false if the timeout elapsed without the event occuring.
+// Returns true if the event fires, false if the timeout elapsed without the event occurring.
bool gui_activity_wait_event(gui_activity_t* activity, const char* event_base, uint32_t event_id,
esp_event_base_t* trigger_event_base, int32_t* trigger_event_id, void** trigger_event_data, TickType_t max_wait)
{
### main/gui.h
@@ -324,7 +324,7 @@ struct gui_activity_t {
// linked list of selectable elements
selectable_t* selectables;
- // The node intially selected when activated/switched-to
+ // The node initially selected when activated/switched-to
gui_view_node_t* initial_selection;
// linked list of updatable elements
### main/identity.c
@@ -307,7 +307,7 @@ bool get_identity_pubkey(const char* identity, const size_t identity_len, const
JADE_LOGE(
"get_identity_pubkey() failed to get key/curve for '%.*s' and index %u", identity_len, identity, index);
} else {
- // Return the pubkey assoiciated with this identity/signature
+ // Return the pubkey associated with this identity/signature
size_t pubkeylen = 0;
JADE_ZERO_VERIFY(mbedtls_ecp_point_write_binary(&keypair.MBEDTLS_PRIVATE(grp), &keypair.MBEDTLS_PRIVATE(Q),
MBEDTLS_ECP_PF_UNCOMPRESSED, &pubkeylen, pubkey_out, pubkey_out_len));
@@ -397,7 +397,7 @@ bool sign_identity(const char* identity, const size_t identity_len, const size_t
bool result = false;
if (get_internal_keypair(SLIP13_PATH_PREFIX, identity, identity_len, index, curve_name, curve_name_len, &keypair)) {
- // Return the pubkey assoiciated with this identity/signature
+ // Return the pubkey associated with this identity/signature
size_t pubkeylen = 0;
JADE_ZERO_VERIFY(mbedtls_ecp_point_write_binary(&keypair.MBEDTLS_PRIVATE(grp), &keypair.MBEDTLS_PRIVATE(Q),
MBEDTLS_ECP_PF_UNCOMPRESSED, &pubkeylen, pubkey_out, pubkey_out_len));
### main/idletimer.c
@@ -38,7 +38,7 @@ static void set_screen_dimmed(const bool dimmed)
}
// Function to (temporarily?) set a minimum timeout value
-// eg. to set temporarilty while doing a 'slow' operation where
+// eg. to set temporarily while doing a 'slow' operation where
// you don't want the hw hitting the idle timeout and shutting down.
// eg. using the camera to scan large qrs or similar.
void idletimer_set_min_timeout_secs(const uint16_t min_timeout_secs) { min_timeout_override_secs = min_timeout_secs; }
@@ -104,7 +104,7 @@ static bool show_timeout_warning_screen(void)
// The idle timer task - loops, waking periodically to check the time since
// the last registered user activity. If sufficiently long ago, deactivates
-// the device, after having diplayed a warning/cancel screen for a few seconds.
+// the device, after having displayed a warning/cancel screen for a few seconds.
static void idletimer_task(void* ignore)
{
const TickType_t period = SECS_TO_TICKS(TIMEOUT_SLEEP_PERIOD_SECS);
@@ -217,7 +217,7 @@ void idletimer_init(void)
JADE_LOGI("powering screen, dimmed mode: %u", start_dimmed);
set_screen_dimmed(start_dimmed);
- // Create mutext semaphore.
+ // Create mutex semaphore.
last_activity_mutex = xSemaphoreCreateMutex();
JADE_ASSERT(last_activity_mutex);
### main/jade_abort.c
@@ -17,7 +17,7 @@ static bool abort_display_attempted = false;
void jade_abort(const char* file, const int line_n)
{
- // Clear senstitive data
+ // Clear sensitive data
keychain_clear();
sensitive_clear_stack();
### main/keychain.c
@@ -468,7 +468,7 @@ static bool keychain_encrypt_and_save_blob(
return false;
}
if (!cleartext_blob || blob_len > SERIALIZED_KEY_LEN) {
- // Invlaid cleartext blob
+ // Invalid cleartext blob
return false;
}
### main/multisig.c
@@ -120,7 +120,7 @@ bool multisig_data_to_bytes(const script_variant_t variant, const bool sorted, c
return wallet_hmac_with_master_key(output_bytes, output_len - HMAC_SHA256_LEN, write_ptr, HMAC_SHA256_LEN);
}
-// Before v3 signer data was the simply the signers' immediate parent xpubs, concatentated
+// Before v3 signer data was simply the signers' immediate parent xpubs, concatenated
// Not possible to read full signer metadata records, just the xpubs needed to make pubkeys/addresses
static bool read_simple_signers(
const uint8_t* const signer_bytes, const size_t signer_bytes_len, const uint8_t version, multisig_data_t* output)
@@ -341,7 +341,7 @@ bool multisig_data_from_bytes(const uint8_t* bytes, const size_t bytes_len, mult
}
}
- // What was saved per signer changed in v3 (so that we can re-consistite the original input data)
+ // What was saved per signer changed in v3 (so that we can re-constitute the original input data)
// All bytes remaining in buffer, up to the hmac, are the signer data.
const size_t signer_bytes_len = bytes + bytes_len - HMAC_SHA256_LEN - read_ptr;
if (version < 3) {
### main/otpauth.c
@@ -662,7 +662,7 @@ static void pad_secret(uint8_t* secret, size_t* secret_len, const size_t min_siz
* they just use the short secret as is.
* To maintain maximum compatibility we do not lengthen the secret for SHA1 *only*, and we do
* lengthen short secrets for other hash digest algorithms.
- * This provides compatability with gauth-like services, and should also remain compatible with
+ * This provides compatibility with gauth-like services, and should also remain compatible with
* HOTP/SHA1 which does not extend the secrets.
*
* IMPORTANT: both *otp_ctx* and *md_ctx* must be initialized before calling this function.
### main/process.c
@@ -204,7 +204,7 @@ void init_jade_process(jade_process_t* process)
{
JADE_ASSERT(process);
- // No 'current' message when intially created
+ // No 'current' message when initially created
process->ctx.cbor = NULL;
process->ctx.cbor_len = 0;
process->ctx.source = SOURCE_NONE;
### main/process.h
@@ -29,7 +29,7 @@
#define MAX_OUTPUT_MSG_SIZE (1024 * 3)
#else
// When CONFIG_RETURN_CAMERA_IMAGES is defined we allocate a larger
-// buffer as image sizes are much larger than standard messges.
+// buffer as image sizes are much larger than standard messages.
#define MAX_OUTPUT_MSG_SIZE ((1024 * 3) * 30)
#endif
@@ -85,7 +85,7 @@ void dump_mem_report(void);
WARN_UNUSED_RESULT bool jade_process_init(
TaskHandle_t** serial_handle, TaskHandle_t** ble_handle, TaskHandle_t** qemu_tcp_handle, TaskHandle_t** gui_handle);
-// Intialise and cleanup jade process structs
+// Initialise and cleanup jade process structs
void init_jade_process(jade_process_t* process_ptr);
void cleanup_jade_process(jade_process_t* process);
### main/process/auth_user.c
@@ -148,7 +148,7 @@ static bool get_pin_get_aeskey(jade_process_t* process, const char* title, uint8
#ifndef CONFIG_DEBUG_UNATTENDED_CI
if (!run_digit_entry_loop(&digit_entry)) {
// User abandoned entering pin
- jade_process_reject_message(process, CBOR_RPC_USER_CANCELLED, "User abandonded pin entry");
+ jade_process_reject_message(process, CBOR_RPC_USER_CANCELLED, "User abandoned pin entry");
SENSITIVE_POP(&digit_entry);
return false;
}
### main/process/dashboard.c
@@ -403,7 +403,7 @@ static void process_add_entropy_request(jade_process_t* process)
goto cleanup;
}
- // Feed received entropy into the random gnerator
+ // Feed received entropy into the random generator
refeed_entropy(entropy, written);
jade_process_reply_to_message_ok(process);
@@ -502,7 +502,7 @@ static void dispatch_message(jade_process_t* process)
} else if (IS_METHOD("ota")) {
if (ota_allowed(process->ctx.source)) {
// If we are about to start an OTA we stop the other/unused external connection
- // interface for performance, stabililty and security reasons.
+ // interface for performance, stability and security reasons.
enable_connection_interfaces(process->ctx.source);
task_function = ota_process;
} else {
@@ -512,7 +512,7 @@ static void dispatch_message(jade_process_t* process)
} else if (IS_METHOD("ota_delta")) {
if (ota_allowed(process->ctx.source)) {
// If we are about to start an OTA we stop the other/unused external connection
- // interface for performance, stabililty and security reasons.
+ // interface for performance, stability and security reasons.
enable_connection_interfaces(process->ctx.source);
task_function = ota_delta_process;
} else {
@@ -1136,8 +1136,8 @@ static void handle_registered_wallets(void)
continue;
}
- // Warning for unsorted multisig, as this is not strictly handled by the origial
- // common file format and may not be supported by the imprting wallet.
+ // Warning for unsorted multisig, as this is not strictly handled by the original
+ // common file format and may not be supported by the importing wallet.
if (!multisig_data.sorted) {
await_message_4(
"Exporting unsorted", "multisig - ensure the", "wallet app supports", "this configuration");
@@ -2152,7 +2152,7 @@ static gui_activity_t* create_settings_menu(const bool startup_menu)
{
gui_activity_t* act = NULL;
if (startup_menu) {
- // Startup (click on spalsh screen) menu
+ // Startup (click on splash screen) menu
act = make_startup_options_activity();
} else if (keychain_get()) {
// Unlocked Jade - main settings
@@ -2161,7 +2161,7 @@ static gui_activity_t* create_settings_menu(const bool startup_menu)
// Locked Jade - before pin entry when saved wallet exists
act = make_locked_settings_activity();
} else {
- // Uninitilised Jade - no wallet set
+ // Uninitialised Jade - no wallet set
act = make_uninitialised_settings_activity();
}
return act;
@@ -2348,7 +2348,7 @@ static void handle_settings(const bool startup_menu)
break;
case BTN_SETTINGS_REGISTERED_WALLETS:
- // Potentialy shows so many screens, menu screen will have been freed
+ // Potentially shows so many screens, menu screen will have been freed
handle_registered_wallets();
act = make_wallet_settings_activity();
break;
@@ -2721,7 +2721,7 @@ static void do_dashboard(jade_process_t* process, const keychain_t* const initia
// Allow serial to be plugged even if we're not unlocked over serial for eg. charging.
// NOTE: if this clears a populated keychain then this loop will complete
// and cause this function to return.
- // NOTE: only applies to a *peristed* keychain - ie if we have a pin set, and *NOT*
+ // NOTE: only applies to a *persisted* keychain - ie if we have a pin set, and *NOT*
// if this is a temporary/emergency-restore wallet.
if (initial_has_pin && initial_keychain && !keychain_has_temporary()) {
if ((initial_userdata == SOURCE_SERIAL && !tolerate_usb_disconnection && !usb_is_powered())
@@ -2792,7 +2792,7 @@ void dashboard_process(void* process_ptr)
// We have six cases:
// 1. Ready - has keys already associated with a message source
// - ready screen (created early and persistent, see above)
- // 2. Awaiting QR intialisation - this is a special case of either 3. or 4. below
+ // 2. Awaiting QR initialisation - this is a special case of either 3. or 4. below
// - just show 'Processing...' screen while we await QR client task
// 3. Unused keys - has keys in memory, but not yet connected to an app
// - connect-to screen
### main/process/debug_clean.c
@@ -42,9 +42,9 @@ void debug_clean_reset_process(void* process_ptr)
// Clean multisig registrations from storage
char multisig_names[MAX_MULTISIG_REGISTRATIONS][NVS_KEY_NAME_MAX_SIZE]; // Sufficient
- const size_t num_multsig_names = sizeof(multisig_names) / sizeof(multisig_names[0]);
+ const size_t num_multisig_names = sizeof(multisig_names) / sizeof(multisig_names[0]);
size_t num_multisigs = 0;
- bool ok = storage_get_all_multisig_registration_names(multisig_names, num_multsig_names, &num_multisigs);
+ bool ok = storage_get_all_multisig_registration_names(multisig_names, num_multisig_names, &num_multisigs);
JADE_ASSERT(ok);
for (int i = 0; i < num_multisigs; ++i) {
### main/process/mnemonic.c
@@ -128,8 +128,8 @@ static bool mnemonic_export_qr(const char* mnemonic, bool* export_qr_verified)
// scans and the data imported matches the expected entropy.
// NOTE: the gui activities are created and freed (by frequent calls to
// gui_set_current_activity_ex()) inside the loop - this is less efficient
- // but keeps the maximum amout of free DRAM available at all times.
- // This is vital to prevent fragmentation occuring which then causes the large
+ // but keeps the maximum amount of free DRAM available at all times.
+ // This is vital to prevent fragmentation occurring which then causes the large
// allocations made by the qr-scanner to fail (even if there appears to be
// sufficient DRAM available).
bool retval = true;
@@ -302,7 +302,7 @@ static bool display_confirm_mnemonic(const size_t nwords, char* mnemonic, const
continue;
}
if (ev_id == BTN_MNEMONIC_EXIT) {
- // User abandonded
+ // User abandoned
JADE_LOGD("user abandoned noting mnemonic");
goto cleanup;
}
@@ -934,7 +934,7 @@ static size_t get_wordlist_words(
num_filter_words = calculate_valid_final_words(wordlist_words, word_index, nwords, final_words);
p_filter_words = final_words;
- // When we select from the valid words, randomise the initally selected word
+ // When we select from the valid words, randomise the initially selected word
random_first_selection_word = true;
}
@@ -1338,7 +1338,7 @@ bool import_mnemonic(const uint8_t* bytes, const size_t bytes_len, char* buf, co
JADE_ASSERT(bytes[bytes_len] == '\0');
// 1. Try seedsigner compact format (ie. raw 128bit or 256bit entropy)
- // 2. Try seedsigner standard format (string of 4-digit indicies, no spaces)
+ // 2. Try seedsigner standard format (string of 4-digit indices, no spaces)
// 3. Try bcur bip39 format (starts with a specific string prefix)
// 4. Try to read word prefixes or whole words (space separated)
return import_compactseedqr(bytes, bytes_len, buf, buf_len, written)
@@ -1473,7 +1473,7 @@ void get_passphrase(char* passphrase, const size_t passphrase_len)
bool derive_keychain(const bool temporary_restore, const char* mnemonic)
{
JADE_ASSERT(mnemonic);
- // NOTE: mnemnonic should be valid at this point for best UX
+ // NOTE: mnemonic should be valid at this point for best UX
keychain_t keydata = { 0 };
SENSITIVE_PUSH(&keydata, sizeof(keydata));
### main/process/ota_util.c
@@ -297,7 +297,7 @@ void ota_finalize(jade_process_t* process, jade_ota_ctx_t* joctx, const bool is_
JADE_ASSERT(joctx);
if (joctx->ota_return_status != OTA_SUCCESS) {
- goto error; // An error has already occured, return it
+ goto error; // An error has already occurred, return it
}
// To reach this far without error, the user must have confirmed
### main/process/pinclient.c
@@ -26,7 +26,7 @@ extern const uint8_t server_public_key_start[] asm("_binary_pinserver_public_key
static const char PINSERVER_DOC_GET_PIN[] = "get_pin";
static const char PINSERVER_DOC_SET_PIN[] = "set_pin";
-// Fixed hmac keys used to derive ephemeral encrpytion keys
+// Fixed hmac keys used to derive ephemeral encryption keys
static const unsigned char LABEL_ORACLE_REQUEST[]
= { 'b', 'l', 'i', 'n', 'd', '_', 'o', 'r', 'a', 'c', 'l', 'e', '_', 'r', 'e', 'q', 'u', 'e', 's', 't' };
static const unsigned char LABEL_ORACLE_RESPONSE[]
@@ -146,7 +146,7 @@ static bool pin_get_unit_privatekey(uint8_t* privatekey, const size_t key_len)
return res;
}
-// Hepler to tweak the server static key into a session key
+// Helper to tweak the server static key into a session key
static bool generate_ske(pin_keys_t* pinkeys)
{
JADE_ASSERT(pinkeys);
@@ -423,7 +423,7 @@ static bool assemble_reply_data(
JADE_ASSERT(output);
JADE_ASSERT(output_len > payload_len);
- // Concatentate fields and base-64 encode
+ // Concatenate fields and base-64 encode
uint8_t data[sizeof(pinkeys->cke) + sizeof(pinkeys->replay_counter) + CLIENT_REQUEST_MAX_PAYLOAD_LEN];
const size_t data_len = sizeof(pinkeys->cke) + sizeof(pinkeys->replay_counter) + payload_len;
JADE_ASSERT(data_len <= sizeof(data));
### main/process/process_utils.c
@@ -327,7 +327,7 @@ bool params_tx_input_signing_data(const bool use_ae_signatures, CborValue* param
const uint8_t** ae_host_commitment, size_t* ae_host_commitment_len, const uint8_t** script, size_t* script_len,
script_flavour_t* aggregate_script_flavour, const char** errmsg)
{
- // Ensure that input_data_t meets our expections
+ // Ensure that input_data_t meets our exceptions
JADE_STATIC_ASSERT(sizeof(((input_data_t*)0)->path) == MAX_PATH_LEN * sizeof(uint32_t));
JADE_STATIC_ASSERT(sizeof(((input_data_t*)0)->id) == MAXLEN_ID + 1);
JADE_ASSERT(params);
### main/process/register_descriptor.c
@@ -230,7 +230,7 @@ void register_descriptor_process(void* process_ptr)
goto cleanup;
}
- // Descriptor script and paramaterised values
+ // Descriptor script and parameterised values
descriptor_data_t descriptor = { .script_len = 0, .num_values = 0, .type = DESCRIPTOR_TYPE_UNKNOWN };
written = 0;
### main/process/register_multisig.c
@@ -23,7 +23,7 @@ bool show_multisig_activity(const char* multisig_name, bool is_sorted, uint32_t
const uint8_t* wallet_fingerprint, size_t wallet_fingerprint_len, bool initial_confirmation, bool overwriting,
bool is_valid);
-// Function to validate multsig parameters and persist the record
+// Function to validate multisig parameters and persist the record
static int register_multisig(const char* multisig_name, const network_t network_id,
const script_variant_t script_variant, const bool sorted, const uint32_t threshold, const signer_t* signers,
const size_t num_signers, const uint8_t* master_blinding_key, const size_t master_blinding_key_len,
### main/process/register_otp.c
@@ -151,7 +151,7 @@ void register_otp_process(void* process_ptr)
return;
}
-// Helper so user can enter OTP Name and URI via the keyboard screeens
+// Helper so user can enter OTP Name and URI via the keyboard screens
static bool get_otp_data_from_kb(
char* otp_name, const size_t name_len, char* otp_uri, const size_t uri_len, size_t* uri_written)
{
@@ -166,7 +166,7 @@ static bool get_otp_data_from_kb(
kb_entry.keyboards[2] = KB_NUMBERS_SYMBOLS;
kb_entry.keyboards[3] = KB_REMAINING_SYMBOLS;
kb_entry.num_kbs = 4;
- kb_entry.blocked_chars = " "; // OTP names cant have spaces
+ kb_entry.blocked_chars = " "; // OTP names can't have spaces
make_keyboard_entry_activity(&kb_entry, "OTP Name");
JADE_ASSERT(kb_entry.activity);
### main/process/sign_psbt.c
@@ -733,7 +733,7 @@ int sign_psbt(jade_process_t* process, CborValue* params, const network_t networ
}
const bool for_liquid = is_elements;
// Liquid: Optional ELIP-0101 genesis blockhash can override test network defaults.
- // Defers to params_genesis_hash() for validation (only needed for Lisuid/PSET).
+ // Defers to params_genesis_hash() for validation (only needed for Liquid/PSET).
size_t has_genesis_blockhash = 0;
if (for_liquid) {
JADE_WALLY_VERIFY(wally_psbt_has_global_genesis_blockhash(psbt, &has_genesis_blockhash));
### main/process/sign_utils.c
@@ -250,7 +250,7 @@ bool params_additional_info(jade_process_t* process, CborValue* params, const st
*is_partial = false;
*txtype = TXTYPE_SEND_PAYMENT;
- // If no 'additional_info' passed, assume this is a a simple send-payment 'classic' tx
+ // If no 'additional_info' passed, assume this is a simple send-payment 'classic' tx
CborValue additional_info;
if (!rpc_get_map("additional_info", params, &additional_info)) {
return true;
### main/qrmode.c
@@ -367,7 +367,7 @@ bool handle_xpub_options(uint32_t* qr_flags, bool for_descriptor)
}
}
- // If updated, persist prefereces
+ // If updated, persist preferences
*qr_flags = (uint16_t)(*qr_flags);
*qr_flags |= (((uint32_t)account_index) << ACCOUNT_INDEX_FLAGS_SHIFT);
if (initial_flags == *qr_flags) {
@@ -769,7 +769,7 @@ static bool verify_address(const address_data_t* const addr_data)
}
confirmed_at_index = index;
} else {
- // Giver user a chance to exit or to skip this batch of addresses
+ // Give user a chance to exit or to skip this batch of addresses
int32_t ev_id = 0;
#ifndef CONFIG_DEBUG_UNATTENDED_CI
const bool ret = sync_wait_event(event_data, NULL, &ev_id, NULL, 10 / portTICK_PERIOD_MS) == ESP_OK;
@@ -900,7 +900,7 @@ static bool handle_qr_options(uint32_t* qr_flags, const char* help_url)
return false;
}
- // Persist prefereces and return true to indicate they were changed
+ // Persist preferences and return true to indicate they were changed
storage_set_qr_flags(*qr_flags);
return true;
}
@@ -970,7 +970,7 @@ static void display_bcur_qr(const char* message[], const size_t message_size, co
idletimer_set_min_timeout_secs(0);
}
-// Handle undifferentiated byte string friom QR code
+// Handle undifferentiated byte string from QR code
// ie. raw data (not BC-UR wrapped), OR the payload of a UR:BYTES message
static bool handle_qr_bytes(const uint8_t* bytes, const size_t bytes_len)
{
@@ -1136,7 +1136,7 @@ void show_bip85_bip39_entropy_qr(const uint8_t* cbor, const size_t cbor_len)
display_bcur_qr(message, 3, BCUR_TYPE_JADE_BIP8539_REPLY, cbor, cbor_len, "blkstrm.com/bip85");
}
-// Returns false if an error occured or the user cancelled the action
+// Returns false if an error occurred or the user cancelled the action
static bool handle_bip85_bip39_request_qr(const uint8_t* cbor, const size_t cbor_len)
{
JADE_ASSERT(cbor && cbor_len);
@@ -1437,7 +1437,7 @@ static void add_cr_after_last_slash(const char* url, char* output, const size_t
JADE_ASSERT(index < url_len);
strncpy(output, url, index + 1); // up to and including the '/'
- output[index + 1] = '\n'; // explict line-break
+ output[index + 1] = '\n'; // explicit line-break
strcpy(output + index + 2, url + index + 1);
}
@@ -1590,7 +1590,7 @@ bool await_qr_back_continue_activity(
gui_next_qrcode_color();
gui_repaint(act->root_node);
} else if (ev_id == BTN_YES || ev_id == BTN_NO) {
- // Done: return whether 'Continue' was cicked
+ // Done: return whether 'Continue' was clicked
return ev_id == BTN_YES;
}
}
@@ -1782,7 +1782,7 @@ static void auth_qr_client_task(void* ctx)
// NOTE: we just use ctx being NULL or not to convey boolean
const bool suppress_pin_change_confirmation = (ctx != NULL);
- // Only needed/expected for 'full' inititialistion with pinserver
+ // Only needed/expected for 'full' initialisation with pinserver
JADE_ASSERT(!keychain_has_temporary());
// Drain any old messages sitting on the QR queue
@@ -1826,7 +1826,7 @@ static void auth_qr_client_task(void* ctx)
void handle_qr_auth(const bool suppress_pin_change_confirmation)
{
- // Only needed/expected for 'full' inititialistion with pinserver
+ // Only needed/expected for 'full' initialisation with pinserver
JADE_ASSERT(!keychain_has_temporary());
// Start a task to run the qr client side
### main/qrscan.c
@@ -188,7 +188,7 @@ bool jade_camera_scan_qr(
qr_data->ds = JADE_MALLOC_PREFER_DRAM(sizeof(struct datastream));
qr_data->ds->data = JADE_MALLOC_PREFER_DRAM(QUIRC_MAX_PAYLOAD * sizeof(uint8_t));
- // Run the camera task trying to interpet frames as qr-codes
+ // Run the camera task trying to interpret frames as qr-codes
const bool show_camera_ui = true;
const bool show_click_button = false;
gui_activity_t* camera_act = NULL;
### main/selfcheck.c
@@ -27,7 +27,7 @@ int register_multisig_file(const char* multisig_file, size_t multisig_file_len,
static const char SERVICE_PATH_HEX[] = "00c9678fbd9d9f6a96bd43221d56733b5aba8f528487602b894e72d0f56e380f7d145b65639db7e"
"e4f528a3fcfb8277b0cbbea00ef64767a531e9a447cacbfbc";
-// See macros in keychain.c for calculating encrpyted blob lengths below
+// See macros in keychain.c for calculating encrypted blob lengths below
// (Payload data is padded to next multiple of 16, and is concatenated between iv and hmac)
// 16 (iv) + 208 (length of data stored (78 (key) + 64 (ga path) + 64 (blinding key)) padded to next 16x) + 32 (hmac)
static const size_t FULL_KEY_BLOBLEN = 256;
### main/signer.c
@@ -54,8 +54,8 @@ bool validate_signers(const signer_t* signers, const size_t num_signers, const b
// See if signer matches this wallet (by fingerprint)
if (!sodium_memcmp(wallet_fingerprint, signer->fingerprint, wallet_fingerprint_len)) {
// This signer has our fingerprint - check xpub provided
- // NOTE: because some 3rd-party apps provide xpubs which are slightly incorrect in their ancilliary
- // metadata fields, we can't strictly compare xpub strings without affecting compatabililty.
+ // NOTE: because some 3rd-party apps provide xpubs which are slightly incorrect in their ancillary
+ // metadata fields, we can't strictly compare xpub strings without affecting compatibility.
// Instead we deserialise the provided xpub string and compare pubkey and chaincode only.
// NOTE: a mismatch here is not a hard fail as could be a fingerprint clash with another signer
struct ext_key hdkey_calculated;
### main/smoketest.c
@@ -213,7 +213,7 @@ static void check_template_three(gui_activity_t** act, const char* title, const
gui_make_fill(&node2, color, FILL_PLAIN, vsplit);
gui_set_padding(node2, GUI_MARGIN_ALL_DIFFERENT, 2, 0, 2, 0);
- // Main area, line threee
+ // Main area, line three
gui_view_node_t* node3;
gui_make_fill(&node3, color, FILL_PLAIN, vsplit);
gui_set_padding(node3, GUI_MARGIN_ALL_DIFFERENT, 2, 0, 2, 0);
### main/storage.c
@@ -418,7 +418,7 @@ bool storage_get_stats(size_t* entries_used, size_t* entries_free)
bool storage_key_name_valid(const char* name)
{
// Allow ascii 33-126 incl - ie. letters, numbers and other printable/punctuation characters
- // NOTE: space and \n are disllowed.
+ // NOTE: space and \n are disallowed.
// Also check length.
const char* pch = name;
while (*pch != '\0') {
### main/ui/dashboard.c
@@ -538,7 +538,7 @@ gui_activity_t* make_wallet_erase_pin_info_activity(void)
gui_activity_t* const act = make_show_message_activity(message, 3, "Wallet-Erase PIN", hdrbtns, 2, &ftrbtn, 1);
- // Set the intially selected item to the 'Continue' button
+ // Set the initially selected item to the 'Continue' button
gui_set_activity_initial_selection(ftrbtn.btn);
return act;
@@ -821,7 +821,7 @@ static void make_legal_page(link_activity_t* page_act, int legal_page)
}
}
- // Set the intially selected item to the next/verify (ie. the last) button
+ // Set the initially selected item to the next/verify (ie. the last) button
gui_set_activity_initial_selection(hdrbtns[1].btn);
// Copy activity and prev and next buttons into output struct
### main/ui/descriptor.c
@@ -122,7 +122,7 @@ static gui_activity_t* make_view_descriptor_activities(const char* descriptor_na
const char* message[] = { display_str };
act_scripts[iscreen] = make_show_message_activity(message, 1, title, hdrbtns, 2, NULL, 0);
- // Set the intially selected item to the 'Next' button
+ // Set the initially selected item to the 'Next' button
gui_set_activity_initial_selection(hdrbtns[1].btn);
}
*num_script_screens = script_screens_needed;
@@ -138,7 +138,7 @@ static gui_activity_t* make_view_descriptor_activities(const char* descriptor_na
const char* title = initial_confirmation ? "Register Descriptor" : "Registered Wallet";
gui_activity_t* const act = make_menu_activity(title, hdrbtns, 2, menubtns, 2);
- // Set the intially selected item to the 'Next' button
+ // Set the initially selected item to the 'Next' button
gui_set_activity_initial_selection(hdrbtns[1].btn);
// NOTE: can only set scrolling *after* gui tree created
@@ -241,7 +241,7 @@ static gui_activity_t* make_final_descriptor_summary_activities(
const char* title = initial_confirmation ? "Register Descriptor" : "Registered Wallet";
gui_activity_t* const act = make_menu_activity(title, hdrbtns, 2, menubtns, 3);
- // Set the intially selected item to 'Discard' when confirming new record
+ // Set the initially selected item to 'Discard' when confirming new record
// but to 'Retain' when viewing existing record.
gui_set_activity_initial_selection(hdrbtns[initial_confirmation ? 0 : 1].btn);
@@ -293,7 +293,7 @@ bool show_descriptor_activity(const char* descriptor_name, const descriptor_data
JADE_ASSERT(descriptor);
JADE_ASSERT(signer_details);
- // Overwriting only applies to intial confirmations - which cannot be invalid
+ // Overwriting only applies to initial confirmations - which cannot be invalid
JADE_ASSERT(!overwriting || initial_confirmation);
JADE_ASSERT(!initial_confirmation || is_valid);
### main/ui/dialogs.c
@@ -5,7 +5,7 @@
void await_qr_help_activity(const char* url);
-// releative
+// relative
#define TITLE_BAR_HEIGHT_PCNT 20
#define FOOTER_BUTTONS_HEIGHT_PCNT 25
@@ -223,7 +223,7 @@ gui_activity_t* make_text_grid_activity(const char* title, btn_data_t* hdrbtns,
gui_activity_t* const act = gui_make_activity();
gui_view_node_t* parent = act->root_node;
- // Add a titlebar if deisred
+ // Add a titlebar if desired
const bool have_hdr = title || num_hdrbtns;
if (have_hdr) {
parent = add_title_bar(act, title, hdrbtns, num_hdrbtns, NULL);
@@ -318,7 +318,7 @@ gui_activity_t* make_show_message_activity(const char* message[], const size_t m
gui_activity_t* const act = gui_make_activity();
gui_view_node_t* parent = act->root_node;
- // Add a titlebar if deisred
+ // Add a titlebar if desired
const bool have_hdr = title || num_hdrbtns;
if (have_hdr) {
parent = add_title_bar(act, title, hdrbtns, num_hdrbtns, NULL);
@@ -332,7 +332,7 @@ gui_activity_t* make_show_message_activity(const char* message[], const size_t m
// Create a vsplit for the text lines
const size_t ypct
= 100 - (have_hdr ? TITLE_BAR_HEIGHT_PCNT : 0) - (num_ftrbtns ? FOOTER_BUTTONS_HEIGHT_PCNT : 0);
- JADE_ASSERT(ypct > 50 && ypct <= 100); // sanity cehck
+ JADE_ASSERT(ypct > 50 && ypct <= 100); // sanity check
const size_t yextent = (ypct * CONFIG_DISPLAY_HEIGHT) / 100;
const size_t h = MESSAGE_LINE_ROW_HEIGHT; // each text line height, appropriate for the default font height
### main/ui/mnemonic.c
@@ -18,7 +18,7 @@ gui_activity_t* make_mnemonic_setup_type_activity(void)
gui_activity_t* const act = make_menu_activity("Setup Type", hdrbtns, 2, menubtns, 2);
- // Set the intially selected item to the 'New' button
+ // Set the initially selected item to the 'New' button
gui_set_activity_initial_selection(menubtns[0].btn);
return act;
@@ -39,7 +39,7 @@ gui_activity_t* make_mnemonic_setup_method_activity(const bool advanced)
gui_activity_t* const act
= make_menu_activity(advanced ? "Advanced Setup" : "Setup Method", hdrbtns, 2, menubtns, 2);
- // Set the intially selected item to the 'New' button
+ // Set the initially selected item to the 'New' button
gui_set_activity_initial_selection(menubtns[0].btn);
return act;
@@ -55,7 +55,7 @@ gui_activity_t* make_new_mnemonic_activity(void)
gui_activity_t* const act = make_menu_activity("Recovery Phrase", hdrbtns, 2, menubtns, 2);
- // Set the intially selected item to the '12 words' button
+ // Set the initially selected item to the '12 words' button
gui_set_activity_initial_selection(menubtns[0].btn);
return act;
@@ -83,7 +83,7 @@ gui_activity_t* make_restore_mnemonic_activity(const bool temporary_restore)
gui_activity_t* const act = make_menu_activity("Restore Wallet", hdrbtns, 2, menubtns, nbtns);
- // Set the intially selected item to the '12 words' or 'Scan QR' buttons
+ // Set the initially selected item to the '12 words' or 'Scan QR' buttons
gui_set_activity_initial_selection(menubtns[selected].btn);
return act;
@@ -120,7 +120,7 @@ gui_activity_t* make_bip85_mnemonic_words_activity(void)
gui_activity_t* const act = make_menu_activity("BIP85", hdrbtns, 2, menubtns, 2);
- // Set the intially selected item to the '12 words' button
+ // Set the initially selected item to the '12 words' button
gui_set_activity_initial_selection(menubtns[0].btn);
return act;
@@ -170,7 +170,7 @@ static void make_show_new_mnemonic_page(
}
SENSITIVE_POP(prefixed_word);
- // Set the intially selected item to the next/verify (ie. the last) button
+ // Set the initially selected item to the next/verify (ie. the last) button
gui_set_activity_initial_selection(hdrbtns[1].btn);
// Copy activity and prev and next buttons into output struct
@@ -452,7 +452,7 @@ gui_activity_t* make_export_qr_overview_activity(const Icon* icon, const bool in
gui_set_align(node, GUI_ALIGN_CENTER, GUI_ALIGN_MIDDLE);
gui_set_parent(node, icon_bg);
- // First row, header, just a back button initally, a back and next button if looping round
+ // First row, header, just a back button initially, a back and next button if looping round
btn_data_t hdrbtns[]
= { { .txt = "=", .font = JADE_SYMBOLS_16x16_FONT, .ev_id = BTN_QR_EXPORT_PREV, .borders = GUI_BORDER_ALL },
{ .txt = NULL, .font = GUI_DEFAULT_FONT, .ev_id = GUI_BUTTON_EVENT_NONE }, // spacer
### main/ui/multisig.c
@@ -120,7 +120,7 @@ static gui_activity_t* make_view_multisig_activities(const char* multisig_name,
const char* title = initial_confirmation ? "Register Multisig" : "Registered Wallet";
gui_activity_t* const act = make_menu_activity(title, hdrbtns, 2, menubtns, 4);
- // Set the intially selected item to the 'Next' button
+ // Set the initially selected item to the 'Next' button
gui_set_activity_initial_selection(hdrbtns[1].btn);
// NOTE: can only set scrolling *after* gui tree created
@@ -269,7 +269,7 @@ static gui_activity_t* make_final_multisig_summary_activities(const char* multis
const char* title = initial_confirmation ? "Register Multisig" : "Registered Wallet";
gui_activity_t* const act = make_menu_activity(title, hdrbtns, 2, menubtns, 4);
- // Set the intially selected item to 'Discard' when confirming new record
+ // Set the initially selected item to 'Discard' when confirming new record
// but to 'Retain' when viewing existing record.
gui_set_activity_initial_selection(hdrbtns[initial_confirmation ? 0 : 1].btn);
@@ -332,7 +332,7 @@ bool show_multisig_activity(const char* multisig_name, const bool is_sorted, con
JADE_ASSERT(wallet_fingerprint);
JADE_ASSERT(wallet_fingerprint_len == BIP32_KEY_FINGERPRINT_LEN);
- // Overwriting only applies to intial confirmations - which cannot be invalid
+ // Overwriting only applies to initial confirmations - which cannot be invalid
JADE_ASSERT(!overwriting || initial_confirmation);
JADE_ASSERT(!initial_confirmation || is_valid);
### main/ui/sign_message.c
@@ -59,7 +59,7 @@ static gui_activity_t* make_sign_message_activities(const char* msgtxt, const ch
JADE_ASSERT(ret > 0 && ret < sizeof(buf));
*actmessage1 = make_show_message_activity(message, 1, "Message (1/2)", hdrbtns, 2, NULL, 0);
- // Set the intially selected item to the 'Next' button
+ // Set the initially selected item to the 'Next' button
gui_set_activity_initial_selection(hdrbtns[1].btn);
// Second message screen has a tick button
@@ -70,7 +70,7 @@ static gui_activity_t* make_sign_message_activities(const char* msgtxt, const ch
JADE_ASSERT(ret > 0 && ret < sizeof(buf));
*actmessage2 = make_show_message_activity(message, 1, "Message (2/2)", hdrbtns, 2, NULL, 0);
- // Set the intially selected item to the 'Next' button
+ // Set the initially selected item to the 'Next' button
gui_set_activity_initial_selection(hdrbtns[1].btn);
}
### main/ui/sign_tx.c
@@ -310,7 +310,7 @@ static gui_activity_t* make_input_output_activities(const char* title, const boo
const size_t num_btns = assetinfo || warning || is_wallet_output ? 4 : 2;
gui_activity_t* const act = make_menu_activity(title, hdrbtns, 2, menubtns, num_btns);
- // Set the intially selected item to the 'Next' button
+ // Set the initially selected item to the 'Next' button
gui_set_activity_initial_selection(hdrbtns[1].btn);
// NOTE: can only set scrolling *after* gui tree created
@@ -655,7 +655,7 @@ static gui_activity_t* make_final_confirmation_activities(const char* title, con
JADE_ASSERT(title);
JADE_ASSERT(feeamount);
JADE_ASSERT(ticker);
- // warning msg is optinal
+ // warning msg is optional
JADE_INIT_OUT_PPTR(actfeeamt);
JADE_INIT_OUT_PPTR(actwarning);
### main/ui/signer.c
@@ -92,7 +92,7 @@ static gui_activity_t* make_signer_activities(const signer_t* signer, const size
*actxpub1 = make_show_message_activity(message, 1, "Xpub (1/2)", hdrbtns, 2, NULL, 0);
- // Set the intially selected item to the 'Next' button
+ // Set the initially selected item to the 'Next' button
gui_set_activity_initial_selection(hdrbtns[1].btn);
// Second message screen has a tick button
@@ -104,7 +104,7 @@ static gui_activity_t* make_signer_activities(const signer_t* signer, const size
*actxpub2 = make_show_message_activity(message, 1, "Xpub (2/2)", hdrbtns, 2, NULL, 0);
- // Set the intially selected item to the 'Next' button
+ // Set the initially selected item to the 'Next' button
gui_set_activity_initial_selection(hdrbtns[1].btn);
}
@@ -145,7 +145,7 @@ static gui_activity_t* make_signer_activities(const signer_t* signer, const size
gui_activity_t* const act = make_menu_activity(title, hdrbtns, 2, menubtns, 4);
- // Set the intially selected item to the 'Next' button
+ // Set the initially selected item to the 'Next' button
gui_set_activity_initial_selection(hdrbtns[1].btn);
// NOTE: can only set scrolling *after* gui tree created
### main/utils/address.c
@@ -107,7 +107,7 @@ void script_to_address(const network_t network_id, const uint8_t* script, const
}
}
-// Convert the passed liquid script into an address (confidential if blindng key passed)
+// Convert the passed liquid script into an address (confidential if blinding key passed)
void elements_script_to_address(const network_t network_id, const uint8_t* script, const size_t script_len,
const bool has_value, const uint8_t* blinding_key, const size_t blinding_key_len, char* output,
const size_t output_len)
### main/wifi.c
@@ -423,7 +423,7 @@ static void socket_server_task(void* arg)
// esp_core_dump_write(&info);
} else if (strncmp(rx_buffer, "stats", 5) == 0) {
// Dump debug stats. These will only be populated if debug code
- // has been added somewhere to popuate them
+ // has been added somewhere to populate them
const size_t num_stats = sizeof(wifi_debug_stats) / sizeof(wifi_debug_stats[0]);
for (size_t i = 0; i < num_stats; ++i) {
snprintf(rx_buffer, sizeof(rx_buffer), "%" PRIx32 ",", wifi_debug_stats[i]);
@@ -556,7 +556,7 @@ void socket_server_send(const char* message, int message_len)
xSemaphoreGive(socket_mutex);
}
-// Convienience function to init WIFI, connect, and start socket server for logging
+// Convenience function to init WIFI, connect, and start socket server for logging
esp_err_t wifi_socket_server_logger_start(void)
{
esp_err_t err = wifi_init(false);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.