-
Notifications
You must be signed in to change notification settings - Fork 108
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:
- New UI ConnectButton: handle connection on multiple chains, it is using
useConnection
to generate custom user wallet interface - New UI WalletModal: the UI modal for selecting which wallet user will connect
- 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
- Remove currency feature because Candy Shop supported automatically get shop currency and symbols
- Add prettier config for better sorting import config and eslint config
- Rename env variables:
REACT_APP_SOLANA_NETWORK => REACT_APP_NETWORK
REACT_APP_SOLANA_RPC_HOST => REACT_APP_RPC_HOST