Unboxed-Software / solana-course

A complete course for learning Solana, including creating and transferring tokens, making NFTs, on-chain app development, and more.
https://solana.com/developers
Mozilla Public License 2.0
395 stars 134 forks source link

Updated walkthrough code examples to match the solution repo in interact-with-wallets #311

Closed bqmackay closed 2 months ago

bqmackay commented 8 months ago

In the lab section of the Interact with Wallets page, the WalletContextProvider code uses the useMemo function to get wallets, but the solution code correctly uses walletAdapterWallets.

Here's the broken code from the lab:

#...imports...

const Home: NextPage = (props) => {
  const endpoint = web3.clusterApiUrl("devnet");
  const wallets = useMemo(() => [], []); # <===== useMemo is here, but not imported from React

And here's the correct line from the solution repo:

const wallets = [new walletAdapterWallets.PhantomWalletAdapter()];
mikemaccana commented 2 months ago

Thanks @bqmackay - the courses have now been migrated to https://solana.com/developers/courses and https://github.com/solana-foundation/developer-content/tree/main/content/courses - can you please send a PR to that repo?

mikemaccana commented 2 months ago

Moved to new repo