Skip to content

Commit 808a425

Browse files
Added message to prevent user from exspose their private key during verification
1 parent 91da65d commit 808a425

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

crates/sozo/walnut/src/verification.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@ struct VerificationPayload {
2929
pub async fn walnut_verify(ws: &Workspace<'_>) -> anyhow::Result<()> {
3030
let ui = ws.config().ui();
3131

32+
ui.print(" ");
33+
ui.print("⚠️ Warning: You are about to submit all workspace files to walnut.
34+
Ensure your project does not contain private keys. Config files like dojo_*.toml will be uploaded.
35+
Press Enter to proceed or any other key to abort: ");
36+
io::stdout();
37+
let mut input = String::new();
38+
io::stdin().read_line(&mut input)?;
39+
40+
if !input.trim().is_empty() {
41+
ui.print("❌ Verification aborted by user.");
42+
return Ok(());
43+
}
3244
// Notify start of verification
3345
ui.print(" ");
3446
ui.print("🌰 Verifying classes with Walnut...");

0 commit comments

Comments
 (0)