Closed vanminh1701 closed 1 year ago
To make the project works with both EVM and SOL blockchain, I have to rewrite the way we get user wallet when connecting to supported wallet: SOL (Phantom, SolFlare), EVM (Metamask).
- new UI
ConnectButton
: handle connection on multiple chains, it is using hookuseConnection
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 CandyShop UI component- global store
useShopStore
: usingzustand
to create a global store for shop config- evm-nework.ts: supported network configuration for EVM
- add prettier config for better sort import config
- rename some env variable names
REACT_APP_SOLANA_NETWORK => REACT_APP_NETWORK REACT_APP_SOLANA_RPC_HOST => REACT_APP_RPC_HOST
This is great, @vanminh1701, it would be helpful if we can add those new UI components with code snippet to introduce it to outside devs in Wiki like your comment here
To make the project works with both EVM and SOL blockchain, I have to rewrite the way we get user wallet when connecting to supported wallet: SOL (Phantom, SolFlare), EVM (Metamask).
ConnectButton
: handle connection on multiple chains, it is using hookuseConnection
to generate custom user wallet interfaceWalletModal
: the UI modal for selecting which wallet user will connectuseUserWallet
: to get wallet and pass it to CandyShop UI componentuseShopStore
: usingzustand
to create a global store for shop config