solana-py icon indicating copy to clipboard operation
solana-py copied to clipboard

Token Transfer Not working if Owner is a public_key

Open whiterabbitcoding opened this issue 3 years ago • 13 comments

whiterabbitcoding avatar Aug 18 '22 12:08 whiterabbitcoding

I have a fix for it can make a PR if you give me permissions.

Below is the fix i believe.

Screenshot 2022-08-18 at 14 32 34

whiterabbitcoding avatar Aug 18 '22 12:08 whiterabbitcoding

Yes. Please create a PR. 🙏

michaelhly avatar Aug 18 '22 12:08 michaelhly

Screenshot 2022-08-19 at 09 42 48

I dont have permissions to push to a branch

whiterabbitcoding avatar Aug 19 '22 07:08 whiterabbitcoding

Please fork the repo and push to your branch.

michaelhly avatar Aug 19 '22 15:08 michaelhly

Maybe related to https://github.com/michaelhly/solana-py/issues/268

michaelhly avatar Sep 15 '22 06:09 michaelhly

The above solution given generates this result:

TypeError: 'Pubkey' object cannot be converted to 'Keypair'

SeveighTech-Management avatar May 03 '23 09:05 SeveighTech-Management

The signer must be a keypair from what I see There is no chance for the signer to be a publickey

self._solders.sign(signers, self._solders.message.recent_blockhash)
solders.SignerError: keypair-pubkey mismatch

Joseph-DKE avatar May 04 '23 01:05 Joseph-DKE

cc @kevinheavey

michaelhly avatar May 07 '23 03:05 michaelhly

ugh maybe we should just bin the solana-py Transasction and direct people to solders.transaction. That doesn't have things like Transaction().add() though. The .add() API sucks but people are used to it and it mimics web3.js

kevinheavey avatar May 07 '23 12:05 kevinheavey

I wouldn't mind lol

michaelhly avatar May 08 '23 00:05 michaelhly

Or add() also add by just recreating the TransactionInstruction with the additional accounts.

michaelhly avatar May 08 '23 00:05 michaelhly

That's what our current Transaction class does and it seems to break everything

kevinheavey avatar May 08 '23 06:05 kevinheavey

I see 😕

michaelhly avatar May 08 '23 18:05 michaelhly