Skip to content

Commit

Permalink
Fix offline signing examples (#1404)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thoralf-M authored Oct 6, 2023
1 parent 4883f7c commit 08fea24
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ async fn write_address_to_file(path: impl AsRef<std::path::Path>, address: &[Bec
println!("{json}");

file.write_all(json.as_bytes()).await.expect("failed to write to file");
file.flush().await.expect("failed to flush output stream");

Ok(())
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ async fn write_prepared_transaction_to_file(
println!("{json}");

file.write_all(json.as_bytes()).await.expect("failed to write file");
file.flush().await.expect("failed to flush output stream");

Ok(())
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ async fn write_signed_transaction_to_file(
let mut file = tokio::io::BufWriter::new(tokio::fs::File::create(path).await.expect("failed to create file"));
println!("{json}");
file.write_all(json.as_bytes()).await.expect("failed to write file");
file.flush().await.expect("failed to flush output stream");

Ok(())
}

0 comments on commit 08fea24

Please sign in to comment.