Skip to content

Commit db63e39

Browse files
committed
api/restore: more robust unit test
Test against fixtures.
1 parent 0ff1f81 commit db63e39

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/rust/bitbox02-rust/src/hww/api/restore.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,15 @@ mod tests {
212212
assert_eq!(counter, 2);
213213
assert!(!keystore::is_locked());
214214
assert!(memory::is_initialized());
215-
assert!(keystore::copy_seed().unwrap().len() == 32);
215+
// Seed of hardcoded phrase used in unit tests:
216+
// boring mistake dish oyster truth pigeon viable emerge sort crash wire portion cannon couple enact box walk height pull today solid off enable tide
217+
assert_eq!(
218+
hex::encode(keystore::copy_seed().unwrap()),
219+
"19f1bcfccf3e9d497cd245cf864ff0d42216625258d4f68d56b571aceb329257"
220+
);
221+
assert_eq!(
222+
hex::encode(keystore::copy_bip39_seed().unwrap()),
223+
"257724bccc8858cfe565b456b01263a4a6a45184fab4531f5c199649207a74e74c399a01d4f957258c05cee818369b31404c884a4b7a29ff6886bae6700fb56a"
224+
);
216225
}
217226
}

0 commit comments

Comments
 (0)