Implementing pages for creating staking pools and supplying rewards
Creating staking pools and supplying rewards are two features of managing staking pools. As a decentralized application, everyone can create staking pools and supply rewards to any staking pools. In this section, we will implement the pages for creating staking pools and supplying rewards for the staking pools.
Improving the token selection modal component
Before implementing the staking pool creation page, we need to improve the token selection modal component src/frontend/components/TokenSelectModal/index.js
because the staking pool creation page will reuse it to select ERC20 tokens (LP tokens or non-LP tokens).
As we mentioned in Chapter 6, Implementing a Liquidity Management Frontend with Web3 and Chapter 8, Working with Native Tokens, the TokenSelectModal
component allows users to select from all tokens deployed by the rpm run deploy
command and the native token ETH. However, sometimes, we should support...