Help me my wallet was locked unable to pay a transaction fee

Step: 1

Write the dumpass contract to initiate data account with signer

#[derive(Accounts)]
pub struct Initialize<'info> {

    #[account(init, payer = authority, space = 8 + 32)]
    pub data_account: Account<'info, DataAccount>,
    #[account(mut)]
    pub authority: Signer<'info>,

    pub system_program: Program<'info, System>
}

Step: 2

In client, accidentally wrote the data account address with payer public key looks like below

    const tx = await program.methods.initialize().accounts({
      dataAccount: provider.wallet.payer.publicKey,
      authority: provider.wallet.publicKey,
      systemProgram: SystemProgram.programId,
    }).signers([provider.wallet.payer]).rpc();

transaction looks successful

After that I cannot use this wallet to do any transaction that required to pay transaction fees anymore

Transaction simulation failed: This account may not be used to pay transaction fees

After basic troubleshooting I found that my wallet had owned by recent deployed contract instead SystemProgram. and that contract has my wallet to be an authority as well

I cannot change and re-assign owner because they need to pay transaction fee

Help me to get out of this loop

1 Like

Hello @mark1 I am facing the same issue right now, did you find a solution? I would be super glad if you could help me out.

hello @yusuf-uluc , have you been able to resolve the issue?

We’re gonna try out some more stuff today. Will let you know if we succeed.

alright, i will try out somethings as well and will get back to you.

1 Like

Hello @xander @mark1 , we finally found out a way to get around this problem. For that we wrote a rust script to update our program, just like you would do with the solana CLI but with the extra functionality of specifying a fee payer for the transaction. We are gonna open source the script this week asap. Will send the link here once ready.