We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4731290 commit ff77aeeCopy full SHA for ff77aee
lib/src/sats_card.rs
@@ -261,8 +261,11 @@ impl SatsCard {
261
}
262
263
264
- // at this point pubkey must be available
265
- let pubkey_bytes = dump_response.pubkey.unwrap();
+ // at this point the card is expected to include the pubkey; if not, treat it as sealed.
+ let pubkey_bytes = match dump_response.pubkey {
266
+ Some(bytes) => bytes,
267
+ None => return Err(DumpError::SlotSealed(slot)),
268
+ };
269
let pubkey = PublicKey::from_slice(&pubkey_bytes)?;
270
271
// TODO use chaincode and master public key to verify pubkey or return error
0 commit comments