phantom / docs

31 stars 17 forks source link

How signAndSendTransaction handle partial signed signature? #32

Closed katopz closed 1 year ago

katopz commented 2 years ago

From my understand when we minting we have to partial sign tx with mint_keypair and call signAndSendTransaction. But when I try call it with

    // Partial sign (except wallet)
    let recent_blockhash = client.get_latest_blockhash().await.unwrap();
    let signers: Vec<&dyn Signer> = vec![&mint_keypair];
    let _result = mint_tx.try_partial_sign(&signers, recent_blockhash);

    let message_data = transaction.message_data();
    let transaction_bs58 = encode(&message_data).into_string();
    let sign_json = json!({
        "method": "signAndSendTransaction",
        "params": {
            "message": transaction_bs58
        },
        "id": 1 as u32,
        "jsonrpc": "2.0"
    });
Phantom - RPC Error: Signature verification failed {code: -32003, message: 'Signature verification failed'}

When signTransaction working just fine for above tx. So, How signAndSendTransaction handle partial signed signature there?

Thanks

eydelrivero commented 1 year ago

hi @katopz did you find the reason for this error?

katopz commented 1 year ago

Not yet, Anyway I end up use method signTransaction instead and then send the tx myself after that as workaround.

eydelrivero commented 1 year ago

@katopz I see, thanks for your help! Maybe someone here from the Phantom team can shed some light on this?

eydelrivero commented 1 year ago

@bfriel how is this closed as 'completed' ?