LIQNFT / candy-shop-storefront

Ethereum, Polygon & Solana NFT Storefront & Auctions
https://candyshop.space
Apache License 2.0
119 stars 106 forks source link

[feat] evm shop #36

Closed vanminh1701 closed 1 year ago

vanminh1701 commented 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).

  1. new UI ConnectButton: handle connection on multiple chains, it is using hook 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 CandyShop UI component
  4. global store useShopStore: using zustand to create a global store for shop config
  5. evm-nework.ts: supported network configuration for EVM
  6. add prettier config for better sort import config
  7. rename some env variable names
    REACT_APP_SOLANA_NETWORK => REACT_APP_NETWORK
    REACT_APP_SOLANA_RPC_HOST => REACT_APP_RPC_HOST
haVincy commented 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).

  1. new UI ConnectButton: handle connection on multiple chains, it is using hook 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 CandyShop UI component
  4. global store useShopStore: using zustand to create a global store for shop config
  5. evm-nework.ts: supported network configuration for EVM
  6. add prettier config for better sort import config
  7. 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