Skip to content
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

Partial sign still doesn't work. #46

Open
TheHmmka opened this issue Jun 30, 2022 · 2 comments
Open

Partial sign still doesn't work. #46

TheHmmka opened this issue Jun 30, 2022 · 2 comments

Comments

@TheHmmka
Copy link

TheHmmka commented Jun 30, 2022

I try to sign transaction which I get from my server.

try transaction.partialSign(signers: [account])
let data = try transaction.serialize()

The problem is in the order of accounts keys (according to instructions in transaction message) and signatures order.

Signed keys:

[
7qNz8fjLwsTF3ifPd8FUZt28PUr5KV593X7XBV2x2ojV,
DkLZoyq5xs92M92yWY2Xrzj4nTFPvx1c1oyfsA6TMPCz,
98P3VqKQ5kRb3Mowp4DPZepEUCQhYpuo9r46sEhSYvW2
]

Signatures:

[
SolanaSwift.Transaction.Signature(signature: Optional(64 bytes), publicKey: 7qNz8fjLwsTF3ifPd8FUZt28PUr5KV593X7XBV2x2ojV),
SolanaSwift.Transaction.Signature(signature: nil, publicKey: 98P3VqKQ5kRb3Mowp4DPZepEUCQhYpuo9r46sEhSYvW2),
SolanaSwift.Transaction.Signature(signature: Optional(64 bytes), publicKey: DkLZoyq5xs92M92yWY2Xrzj4nTFPvx1c1oyfsA6TMPCz)
]
@bigearsenal
Copy link
Collaborator

Hi there, how about trying to sign again, not using partialSign?

@TheHmmka
Copy link
Author

TheHmmka commented Jul 1, 2022

I get transactions with signatures from the server, so the order should be the same, but I can get order only from instructions and first bytes of transactions data for the order of signatures. I think there is a mistake in the parser of transaction inside SDK. But I don't have time to check it. =( In any way the order of signatures and keys should be the same. I add signature outside the SDK and everything is fine.

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

No branches or pull requests

2 participants