Skip to content

Commit

Permalink
Enable the signing logic to fall back to the hardware wallet if secre…
Browse files Browse the repository at this point in the history
…t key is not found.
  • Loading branch information
murisi committed Aug 30, 2024
1 parent 15b6059 commit 31dd498
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/sdk/src/signing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,11 @@ where

for public_key in &signing_data.public_keys {
if !used_pubkeys.contains(public_key) {
let secret_key = find_key_by_pk(&mut wallet, args, public_key)?;
let Ok(secret_key) = find_key_by_pk(&mut wallet, args, public_key) else {
// If the secret key is not found, continue because the
// hardware wallet may still be able to sign this
continue;
};
used_pubkeys.insert(public_key.clone());
signing_tx_keypairs.push(secret_key);
}
Expand Down

0 comments on commit 31dd498

Please sign in to comment.