aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/new.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/new.rs')
-rw-r--r--src/cmd/new.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/cmd/new.rs b/src/cmd/new.rs
index 9110c34..699b825 100644
--- a/src/cmd/new.rs
+++ b/src/cmd/new.rs
@@ -1,7 +1,7 @@
-//! Module implementing the `new` command for generating a mnemonic for a new
+//! Module implementing the `new` subcommand for generating a mnemonic for a new
//! hierarchical deterministic wallet.
-use crate::mnemonic::{Language, Seed};
+use crate::mnemonic::{Language, Mnemonic};
use anyhow::Result;
use structopt::StructOpt;
@@ -18,8 +18,7 @@ pub struct Options {
}
pub fn run(options: Options) -> Result<()> {
- let seed = Seed::random(options.length)?;
- println!("{}", seed.to_mnemonic(options.language));
-
+ let mnemonic = Mnemonic::random(options.language, options.length)?;
+ println!("{}", mnemonic);
Ok(())
}