Skip to content

Supporting EVM and SOL blockchains

RustySol edited this page Nov 22, 2022 · 1 revision

To make the project works with both EVM and SOL blockchain, the way to get user wallet is rewritten to connect the following wallets: SOL (Phantom, SolFlare), EVM (Metamask). For EVM 4 networks is currently supported, listed in this file config: https://github.com/LIQNFT/candy-shop-storefront/blob/master/src/utils/evm-networks.ts

Some new refactors:

  1. New UI ConnectButton: handle connection on multiple chains, it is using useConnection to generate custom user wallet interface
  2. New UI WalletModal: the UI modal for selecting which wallet user will connect
  3. New hook useUserWallet: to get wallet and pass it to Candy Shop UI component global store useShopStore: using zustand to create a global store for shop config evm-nework.ts: supported network configuration for EVM
  4. Remove currency feature because Candy Shop supported automatically get shop currency and symbols
  5. Add prettier config for better sorting import config and eslint config
  6. Rename env variables: REACT_APP_SOLANA_NETWORK => REACT_APP_NETWORK REACT_APP_SOLANA_RPC_HOST => REACT_APP_RPC_HOST
Clone this wiki locally