We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb9f0ab commit b82bebdCopy full SHA for b82bebd
core/src/utils.rs
@@ -89,6 +89,12 @@ pub async fn get_seed_from_locked_device_bundle(
89
90
/// unlock seed_bundles to access the pub-key and seed
91
pub async fn unlock(device_bundle: &str, passphrase: &str) -> SeedExplorerResult<SigningKey> {
92
+ if device_bundle.is_empty() {
93
+ return Err(SeedExplorerError::Generic(
94
+ "called with device_bundle".into(),
95
+ ));
96
+ }
97
+
98
let cipher = base64::decode_config(device_bundle, base64::URL_SAFE_NO_PAD)?;
99
match UnlockedSeedBundle::from_locked(&cipher).await?.remove(0) {
100
LockedSeedCipher::PwHash(cipher) => {
0 commit comments