diff --git a/roles/mint/src/main.rs b/roles/mint/src/main.rs index 19ee94125..6eedf074d 100644 --- a/roles/mint/src/main.rs +++ b/roles/mint/src/main.rs @@ -112,8 +112,8 @@ async fn main() -> Result<()> { pub const HASH_DERIVATION_PATH: u32 = 1337; const NUM_KEYS: u8 = 64; - // TODO securely import mnemonic - let mnemonic = Mnemonic::generate(12).unwrap(); + let mnemonic = Mnemonic::from_str(&mint_settings.info.mnemonic) + .map_err(|e| anyhow::anyhow!("Invalid mnemonic in mint config: {}", e))?; let hash_currency_unit = CurrencyUnit::Custom(HASH_CURRENCY_UNIT.to_string()); @@ -372,4 +372,4 @@ async fn delete_key( tracing::warn!("Failed to delete key '{}': {:?}", key, e); } } -} \ No newline at end of file +}