Skip to content

Commit c6b8334

Browse files
committed
Fixes the accounting of the number of signatures
1 parent 597df8c commit c6b8334

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

crates/sdk/src/signing.rs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ where
348348
let mut used_pubkeys = HashSet::new();
349349

350350
// First try to sign the raw header with the supplied signatures
351+
// FIXME: remove this if, it's useless
351352
if !signing_tx_data.signatures.is_empty() {
352353
let signatures = signing_tx_data
353354
.signatures
@@ -408,7 +409,11 @@ where
408409
Some(FeeAuthorization::Signer {
409410
pubkey: fee_payer,
410411
..
411-
}) if pubkey == fee_payer => {}
412+
}) if pubkey == fee_payer => {
413+
// We will sign the inner tx together with the wrapper,
414+
// we can anticipate the accounting of this signature
415+
used_pubkeys.insert(pubkey.clone());
416+
}
412417
_ => {
413418
if args.dry_run.is_some() {
414419
mock_hw_sig(
@@ -486,15 +491,6 @@ where
486491
)
487492
.await?;
488493
}
489-
// //FIXME: I need to add this to hte used pubkeys
490-
// //FIXME: actually what's the point of this?
491-
// if signing_wrapper_data
492-
// .signing_data
493-
// .public_keys
494-
// .contains(pubkey)
495-
// {
496-
// used_pubkeys.insert(pubkey.clone());
497-
// }
498494
}
499495
}
500496
}

0 commit comments

Comments
 (0)