Skip to content

Commit

Permalink
fix importing softsign secp256k1 key type (#790)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkaczanowski authored Oct 16, 2023
1 parent 1980f9a commit 791e0b9
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/commands/softsign/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,19 @@ impl Runnable for ImportCommand {
status_err!("{}", e);
process::exit(1);
});
info!("Imported Ed25519 private key to {}", output_path.display());
}
PrivateKey::Secp256k1(sk) => {
key_utils::write_base64_secret(output_path, &sk.to_bytes()).unwrap_or_else(|e| {
status_err!("{}", e);
process::exit(1);
});
info!(
"Imported Secp256k1 private key to {}",
output_path.display()
);
}
_ => unreachable!("unsupported priv_validator.json algorithm"),
}

info!("Imported Ed25519 private key to {}", output_path.display());
}
}

0 comments on commit 791e0b9

Please sign in to comment.