Skip to content

Commit 6d93d81

Browse files
committed
Merge branch 'confirm-numwords'
2 parents a449d21 + 4d694f4 commit 6d93d81

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/rust/bitbox02-rust/src/hww/api/bip85.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,6 @@ async fn process_bip39(hal: &mut impl crate::hal::Hal) -> Result<(), Error> {
121121
})
122122
.await?;
123123

124-
hal.ui()
125-
.confirm(&confirm::Params {
126-
title: "",
127-
body: &format!("{} word mnemonic\nfollows", num_words),
128-
accept_is_nextarrow: true,
129-
..Default::default()
130-
})
131-
.await?;
132-
133124
let mnemonic = keystore::bip85_bip39(num_words, index)?;
134125
let words: Vec<&str> = mnemonic.split(' ').collect();
135126
mnemonic::show_and_confirm_mnemonic(hal, &words).await?;

src/rust/bitbox02-rust/src/workflow/mnemonic.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,16 @@ pub async fn show_and_confirm_mnemonic(
114114
hal: &mut impl crate::hal::Hal,
115115
words: &[&str],
116116
) -> Result<(), CancelError> {
117+
hal.ui()
118+
.confirm(&confirm::Params {
119+
title: "",
120+
body: &format!("{} words follow", words.len()),
121+
accept_is_nextarrow: true,
122+
..Default::default()
123+
})
124+
.await
125+
.map_err(|_| CancelError::Cancelled)?;
126+
117127
// Part 1) Scroll through words
118128
show_mnemonic(words).await?;
119129

0 commit comments

Comments
 (0)