solana-py
solana-py copied to clipboard
TokenClient.transfer ignores the constructor's payer argument
I'm trying to transfer spl token from acc1 to acc2 using a payer as a totally different account acc3.
So, I have a token client: client = Token(...., payer=acc3). When I call client.transfer() it fails with: {'code': -32002, 'message': 'Transaction simulation failed: Attempt to debit an account but found no record of a prior credit.', 'data': {'accounts': None, 'err': 'AccountNotFound', 'logs': []}}
I'm absolutely sure that acc3 has enoch SOL.
P.S. The problem only with transfer
method. TokenClient.create_account works fine, it uses payer=acc3 as a payer.
For me even tokenclient.create_account results in this same issue. Using mainnet and have SOL to cover any fees