Retrieving liquidity information
In this section, we will implement the page for listing liquidity. It involves accessing multiple smart contracts to retrieve liquidity-related information. The liquidity information is tied to a wallet account so we require the user to connect their account to view the information.
By completing the liquidity listing page, you will see a page like Figure 6.2:
Figure 6.2 – The implemented page listing liquidity
From the UI in Figure 6.2, a user can view the list of LP tokens and their balances in the accordion components. The amount of tokens for each token pair will be shown once the user clicks the down-arrow button on the right side of each accordion component. The amount of tokens represents how many tokens users can get if they remove the current liquidity. Please note that the amounts could change from time to time if someone else is using this liquidity pool for swapping.
After each of the accordion...