Skip to content

Commit e5e92c3

Browse files
committed
fixes
1 parent 31da806 commit e5e92c3

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

app/rust/src/ffi/ui.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,28 +72,28 @@ pub unsafe extern "C" fn rs_get_intent(out_intent: *mut i8, intent_len: u16) ->
7272
if out_intent.is_null() || intent_len == 0 {
7373
return ParserError::NoData as u32;
7474
}
75-
75+
7676
// Clear the output buffer first
7777
let out_slice = core::slice::from_raw_parts_mut(out_intent as *mut u8, intent_len as usize);
7878
out_slice[0] = 0;
79-
79+
8080
if !UI.is_some() {
81-
return ParserError::NoData as u32;
81+
return ParserError::ContextMismatch as u32;
8282
}
83-
83+
8484
// Safe to unwrap due to previous check
8585
let ui = UI.as_ref().unwrap();
86-
86+
8787
// Access the intent using the public method
8888
if let Some(intent) = ui.message.get_intent() {
8989
let intent_bytes = intent.as_bytes();
9090
let copy_len = core::cmp::min(intent_bytes.len(), intent_len as usize - 1);
91-
91+
9292
out_slice[..copy_len].copy_from_slice(&intent_bytes[..copy_len]);
9393
out_slice[copy_len] = 0; // Null terminate
94-
94+
9595
return ParserError::Ok as u32;
9696
}
97-
97+
9898
ParserError::NoData as u32
9999
}

app/src/handlers/handle_bls.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ __Z_INLINE void handleSignBls(volatile uint32_t *flags, volatile uint32_t *tx, u
107107
// Clear the global buffer first
108108
MEMZERO(G_intent_buffer, sizeof(G_intent_buffer));
109109
parser_error_t intent_err = parser_getIntent(G_intent_buffer, sizeof(G_intent_buffer));
110-
zemu_log_stack(G_intent_buffer);
111110

112111
if (intent_err == parser_ok && strlen(G_intent_buffer) > 0) {
113112
// Use the intent from the parsed message (from global buffer)

0 commit comments

Comments
 (0)