when i intilize a data account using general keypair
i can initilize data account again and again when i run test(no issues)
it("Is initialized!", async () => {
// Add your test here.
const tx = await program.methods
.new()
.accounts({ dataAccount: dataAccount.publicKey })
.signers([dataAccount])
.rpc();
console.log("Your transaction signature", tx);
});
But when data account is pda i am not able initilize data account again and again when i run test
here this gives me error
when i run anchor test second time
it("Is initialized!", async () => {
// Add your test here.
const tx = await program.methods
.new([bump], new anchor.BN(fundLamports))
.accounts({ dataAccount: dataAccountPDA })
.rpc();
console.log("Your transaction signature", tx);
});