Skip to main content
added 329 characters in body
Source Link
Jimii
  • 7.7k
  • 1
  • 8
  • 22

As the error suggests, make sure that you are using the correct signer when sending the tx.

By default, the .rpc method uses the local Solana ~/.config/solana/id.json wallet to sign for transaction.

Check that it is similar to the wallet signer you are using.

If different, you can first convert the method call into a transaction and sign it

await program.methods
    .increaseCounter(new BN(1))
    .accounts({
        counter: counterPda,
        authority: wallet.publicKey,
        system_program: SystemProgram.programId,
    })
    .transaction();

await signTransaction(tx);

As the error suggests, make sure that you are using the correct signer when sending the tx.

By default, the .rpc method uses the local Solana ~/.config/solana/id.json wallet to sign for transaction.

Check that it is similar to the wallet signer you are using.

As the error suggests, make sure that you are using the correct signer when sending the tx.

By default, the .rpc method uses the local Solana ~/.config/solana/id.json wallet to sign for transaction.

Check that it is similar to the wallet signer you are using.

If different, you can first convert the method call into a transaction and sign it

await program.methods
    .increaseCounter(new BN(1))
    .accounts({
        counter: counterPda,
        authority: wallet.publicKey,
        system_program: SystemProgram.programId,
    })
    .transaction();

await signTransaction(tx);
Source Link
Jimii
  • 7.7k
  • 1
  • 8
  • 22

As the error suggests, make sure that you are using the correct signer when sending the tx.

By default, the .rpc method uses the local Solana ~/.config/solana/id.json wallet to sign for transaction.

Check that it is similar to the wallet signer you are using.