-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix invalid account data for instruction
error
#1241
Conversation
Please attach link to the transaction that you sent here |
@@ -40,6 +40,7 @@ sealed class BlockChainSpecific { | |||
val priorityFee: BigInteger, | |||
val fromAddressPubKey: String? = null, | |||
val toAddressPubKey: String? = null, | |||
val tokenAccountExists: Boolean? = null, |
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.
This will not work , as this change is not in the protobuf , thus it doesn't get passed to pair device
and this should caues keysign failure , because they will not agree on what they are signing
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.
Actually, I updated the "common data" submodule.
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.
There is no need to add new stuff to commondata now , please refer to how IOS handle it
https://github.com/vultisig/vultisig-ios/blob/ton-stake-function/VultisigApp/VultisigApp/Chains/Solana.swift#L44
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.
There is no need to add new stuff to commondata now , please refer to how IOS handle it https://github.com/vultisig/vultisig-ios/blob/ton-stake-function/VultisigApp/VultisigApp/Chains/Solana.swift#L44
we don't actually make a Solana account. What we do is create a token account address for the Solana account we want to use, if it doesn't already have one..
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.
This will not work , as this change is not in the protobuf , thus it doesn't get passed to pair device and this should caues keysign failure , because they will not agree on what they are signing
The Android code currently aligns with the iOS code.
vultisig-android/data/src/main/kotlin/com/vultisig/wallet/data/chains/helpers/SolanaHelper.kt
Lines 63 to 69 in 6a7dd2a
if (solanaSpecific.fromAddressPubKey != null && solanaSpecific.toAddressPubKey!= null) { | |
val transfer = Solana.TokenTransfer.newBuilder() | |
.setTokenMintAddress(keysignPayload.coin.contractAddress) | |
.setSenderTokenAddress(solanaSpecific.fromAddressPubKey) | |
.setRecipientTokenAddress(solanaSpecific.toAddressPubKey) | |
.setAmount(keysignPayload.toAmount.toLong()) | |
.setDecimals(keysignPayload.coin.decimal) |
https://github.com/vultisig/vultisig-ios/blob/77da3dbec92dfbe77fc36242cbf7cf0b1f7fb151/VultisigApp/VultisigApp/Chains/Solana.swift#L46-L54
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.
The current iOS version does not address the issue.
@enriquesouza did we address the same issue on IOS? |
|
Instruction data not found
errorinvalid account data for instruction
error
We don't @johnnyluo I just double check that |
5397ebe
to
bfb2303
Compare
c89c2f5
to
629e506
Compare
D5GdnAGgE1YmmWHcEgrVbC3kHTCuszWfyVgvsfrQHZA3 |
@yvebe This one LGTM , should we get it in? |
The objective of this PR is to address the issue that arises when a user transfers a Solana token to an account that lacks the token, resulting in an
Instruction data not found
error.In the event that the recipient Solana account does not possess the token, this PR system will automatically generate a token account for the recipient Solana account.