Skip to content

Commit e6088cb

Browse files
committed
Do not use empty string as a passphrase
Signed-off-by: Onur Özkan <[email protected]>
1 parent d94f603 commit e6088cb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mm2src/coins/rpc_command/offline_keys.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,9 @@ async fn offline_iguana_keys_export_internal(
510510

511511
let prefix_values = extract_prefix_values(&ctx, &ticker, &coin_conf)?;
512512

513-
let passphrase = ctx.conf["passphrase"].as_str().unwrap_or("");
513+
let passphrase = ctx.conf["passphrase"].as_str().ok_or_else(|| {
514+
OfflineKeysError::Internal("Couldn't derive 'passphrase' from the KDF configuration.".to_owned())
515+
})?;
514516

515517
let key_pair = {
516518
match key_pair_from_seed(passphrase) {

0 commit comments

Comments
 (0)