-
Notifications
You must be signed in to change notification settings - Fork 61
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
The signature query obtained after the solana chain sign failed #318
Comments
use walletconnect_flutter_v2: ^2.4.1 |
Hello @pingko, can you share the code in text format so I can copy/paste it on my side? Regarding this
|
Hello @quetool ,The code is as follows: /// get base58encode seckey from android native code
String secKeyEncode = await getSignPrivateKey(arguments);
final secKeyBytes =
Uint8List.fromList(base58decode(secKeyEncode).sublist(0, 32));
final keyPair = await Ed25519HDKeyPair.fromPrivateKeyBytes(
privateKey: secKeyBytes,
);
if (keyPair.address != feePayer) {
debugPrint('address error');
handleWalletConnectData(response, 'transaction error', topic, false, 'SOL');
return;
}
const encoder = JsonEncoder.withIndent(' ');
final transaction = encoder.convert(params);
// Sign the transaction.
final instructions = instructionsList.map((json) {
return (json as Map<String, dynamic>).toInstruction();
}).toList();
final message = Message(instructions: instructions);
final compiledMessage = message.compile(
recentBlockhash: recentBlockHash,
feePayer: Ed25519HDPublicKey.fromBase58(feePayer),
);
final signature = await keyPair.sign(compiledMessage.toByteArray());
response = response.copyWith(
result: {
'signature': signature.toBase58(),
},
);
try {
await web3Wallet.respondSessionRequest(
topic: topic,
response: response,
);
print('sign result:${response.result}...$signature');
} on WalletConnectError catch (error) {
print('WalletConnectError ${error.message}');
} I referred to |
Describe the bug
When I listened to the solana_signTransaction method, I signed the message and got the signature. When I called web3Wallet.respondSessionRequest(), there was no error but it prompted "Error: Signature verification failed. Invalid signature for public key [
My solana address
]. In addition, I could not find this transaction on the solana browser.To Reproduce
Steps to reproduce the behavior:
"Error: Signature verification failed. Invalid signature for public key [
My solana address
].Expected behavior
Transactions can be queried in the blockchain browser
Reproducible code
Screenshots
Desktop (please complete the following information):
Platform agnostic, doesnt matter which device i test on it allways does the explained issue
Smartphone (please complete the following information):
Developing a dApp wallet, Use walletconnectV2Flutter to trade in jito dApp
Additional context
Tasks
The text was updated successfully, but these errors were encountered: