api/show_mnemonic: instruct user to confirm each word
Jumping straight to the confirmation workflow can be confusing.
@@ -18,6 +18,7 @@ use alloc::vec::Vec;
use super::Error;
use crate::pb;
+use crate::workflow::confirm;
use pb::response::Response;
@@ -80,6 +81,18 @@ pub async fn process() -> Result<Response, Error> {
// Part 1) Scroll through words
mnemonic::show_mnemonic(&words).await?;
+ let params = confirm::Params {
+ title: "",
+ body: "Please confirm\neach word",
+ accept_only: true,
+ accept_is_nextarrow: true,
+ ..Default::default()
+ };
+
+ if !confirm::confirm(&params).await {
+ return Err(Error::UserAbort);
+ }
+
// Part 2) Confirm words
for (word_idx, word) in words.iter().enumerate() {
let title = format!("{:02}", word_idx + 1);
