Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Make get token address multichain compatible (#7538)
<!-- Before opening a pull request, please read the [contributing guidelines](https://github.com/pancakeswap/pancake-frontend/blob/develop/CONTRIBUTING.md) first --> <!-- copilot:all --> ### <samp>🤖 Generated by Copilot at 37f8e35</samp> ### Summary 🌐🪙📊 <!-- 1. 🌐 - This emoji represents the multi chain functionality and the use of the `useActiveChainId` hook. 2. 🪙 - This emoji represents the use of the `@pancakeswap/sdk` constants for native and wrapped native tokens, and the token address logic. 3. 📊 - This emoji represents the chart utils and the swap hooks that were updated. --> The pull request enhances the swap functionality and the chart utils to support multiple chains. It uses the `@pancakeswap/sdk` constants and the `useActiveChainId` hook to fetch the correct token addresses based on the chainId. > _`useSingleTokenSwapInfo`_ > _Multi chain support added_ > _Winter of pancakes_ ### Walkthrough * Make `useSingleTokenSwapInfo` hook multi chain compatible by using `useActiveChainId` and `getTokenAddress` ([link](https://github.com/pancakeswap/pancake-frontend/pull/7538/files?diff=unified&w=0#diff-9c9d1c7d1b4f2fd3accab05994fc9d38a2f7c292a12354fa2fdf9811ca25b390L59-R61)) * Replace `BNB_ADDRESS` with `NATIVE` and `WNATIVE` constants in `utils.ts` to make the chart logic more generic and adaptable to different chains ([link](https://github.com/pancakeswap/pancake-frontend/pull/7538/files?diff=unified&w=0#diff-603c4522fbc2af7a727f678261bb07adcb46d9c05fbda40b4348683caf19e142L1-R1))
- Loading branch information