Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/src/sats_card.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,11 @@ impl SatsCard {
}
}

// at this point pubkey must be available
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 {
Some(bytes) => bytes,
None => return Err(DumpError::SlotSealed(slot)),
};
let pubkey = PublicKey::from_slice(&pubkey_bytes)?;

// TODO use chaincode and master public key to verify pubkey or return error
Expand Down Expand Up @@ -456,6 +459,7 @@ impl core::fmt::Debug for SatsCard {
#[cfg(feature = "emulator")]
#[cfg(test)]
mod test {
#![allow(deprecated)] // bdk_wallet::SignOptions is deprecated upstream; tests still rely on it.
use crate::CkTapCard;
use crate::emulator::find_emulator;
use crate::emulator::test::{CardTypeOption, EcardSubprocess};
Expand Down
Loading