Skip to content

Fix PDA derivation ignoring per-call signer override in attest/createSchema#47

Merged
mocolicious merged 2 commits intochen/test-002from
copilot/sub-pr-44-another-one
Mar 18, 2026
Merged

Fix PDA derivation ignoring per-call signer override in attest/createSchema#47
mocolicious merged 2 commits intochen/test-002from
copilot/sub-pr-44-another-one

Conversation

Copy link
Contributor

Copilot AI commented Mar 18, 2026

attest() and createSchema() always used SdkConfig.currentSigner when deriving the attestation/schema PDA, ignoring any signer override passed at the call site. This caused incorrect or empty attestationId when a custom signer was provided.

Changes

  • attest() — derive attester from (signer ?: SdkConfig.currentSigner) so the PDA matches the key that actually signed the transaction
  • createSchema() — same fix applied for consistency
// Before
val attester = SdkConfig.currentSigner?.publicKey

// After
val attester = (signer ?: SdkConfig.currentSigner)?.publicKey

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: mocolicious <6373607+mocolicious@users.noreply.github.com>
Copilot AI changed the title [WIP] [WIP] Address feedback on adding Solana attestation Fix PDA derivation ignoring per-call signer override in attest/createSchema Mar 18, 2026
Copilot AI requested a review from mocolicious March 18, 2026 19:34
@mocolicious mocolicious marked this pull request as ready for review March 18, 2026 19:36
@mocolicious mocolicious merged commit 5d9fb0a into chen/test-002 Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants