Skip to content

Commit 76916f0

Browse files
committed
Removre warning message when performing blind signing (NBGL)
1 parent 48062b8 commit 76916f0

File tree

5 files changed

+2
-43
lines changed

5 files changed

+2
-43
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ledger_device_sdk/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ledger_device_sdk"
3-
version = "1.15.4"
3+
version = "1.15.5"
44
authors = ["yhql", "yogh333", "agrojean-ledger", "kingofpayne"]
55
edition = "2021"
66
license.workspace = true

ledger_device_sdk/src/nbgl.rs

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -267,35 +267,6 @@ pub fn init_comm(comm: &mut Comm) {
267267
}
268268
}
269269

270-
/// Private helper function to display a warning screen when a transaction
271-
/// is reviewed in "blind" mode. The user can choose to go back to safety
272-
/// or review the risk. If the user chooses to review the risk, a second screen
273-
/// is displayed with the option to accept the risk or reject the transaction.
274-
/// Used in NbglReview and NbglStreamingReview.
275-
fn show_blind_warning() -> bool {
276-
const WARNING: NbglGlyph =
277-
NbglGlyph::from_include(include_gif!("icons/Warning_64px.gif", NBGL));
278-
279-
let back_to_safety = NbglChoice::new().glyph(&WARNING).show(
280-
"Security risk detected",
281-
"It may not be safe to sign this transaction. To continue, you'll need to review the risk.",
282-
"Back to safety",
283-
"Review risk",
284-
);
285-
286-
if !back_to_safety {
287-
NbglChoice::new()
288-
.show(
289-
"The transaction cannot be trusted",
290-
"Your Ledger cannot decode this transaction. If you sign it, you could be authorizing malicious actions that can drain your wallet.\n\nLearn more: ledger.com/e8",
291-
"I accept the risk",
292-
"Reject transaction"
293-
)
294-
} else {
295-
false
296-
}
297-
}
298-
299270
#[derive(Copy, Clone)]
300271
pub enum TuneIndex {
301272
Reserved,

ledger_device_sdk/src/nbgl/nbgl_review.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,6 @@ impl<'a> NbglReview<'a> {
9090
None => nbgl_icon_details_t::default(),
9191
};
9292

93-
if self.blind {
94-
if !show_blind_warning() {
95-
return false;
96-
}
97-
}
98-
9993
// Show the review on the device.
10094
self.ux_sync_init();
10195
nbgl_useCaseReview(

ledger_device_sdk/src/nbgl/nbgl_streaming_review.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@ impl NbglStreamingReview {
4242
let title = CString::new(title).unwrap();
4343
let subtitle = CString::new(subtitle).unwrap();
4444

45-
if self.blind {
46-
if !show_blind_warning() {
47-
return false;
48-
}
49-
}
50-
5145
self.ux_sync_init();
5246
nbgl_useCaseReviewStreamingStart(
5347
self.tx_type.to_c_type(self.blind, false),

0 commit comments

Comments
 (0)