anchor icon indicating copy to clipboard operation
anchor copied to clipboard

Fixing compile time issue on tic tac toe guide on referencing wallet

Open darrensapalo opened this issue 2 years ago • 0 comments

Summary

On the guide, the given instructions say that we should use this piece of code:

image

But using that shows that the field is not accessible, because the object's type hasn't been casted yet.

image

Actual:

  const playerOne = program.provider.wallet

Expected:

  const playerOne = (program.provider as anchor.AnchorProvider).wallet

darrensapalo avatar Jul 16 '22 05:07 darrensapalo