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
