-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow to leave missing signatures as null #168
allow to leave missing signatures as null #168
Conversation
this helps backend do partial signatures in the right places
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files |
internal fun List<AccountMeta>.normalize(): List<AccountMeta> = groupBy { it.publicKey } | ||
import net.avianlabs.solana.tweetnacl.ed25519.PublicKey | ||
|
||
internal fun List<AccountMeta>.normalize( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it make sense to have two separate functions ?
normalize()
and normalizeWithFeePayer
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, fee payer might be set or not
logger.warn { "Duplicate signatures detected" } | ||
val signatures = signers.associate { signer -> | ||
signer.publicKey to | ||
TweetNaCl.Signature.sign(serializedMessage, signer.secretKey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we do this now ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so the signatures can preserve the order of account meta list
this helps backend do partial signatures in the right places
we also ensure fee payer stays at the top