MiniDApps for quick testing & prototyping in MiniPay.
-
Create MiniDApps in the
/dApps
folder -
Import the DApp in the
App.tsx
file -
Run the following command to start the DApp
npm start
This will start the app at
http://localhost:3000
. -
Since, this app is running on localhost and cannot be opened in MiniPay we need to create a tunnel we will use ngrok for the same.
-
Create an account on ngrok, setup ngrok on your machine.
[!NOTE] ngrok is offering free static domain, use that so the url of the app does not change!
-
Use the following command, to start the tunnel.
If you have the static domain
ngrok http --domain=<STATIC_DOMAIN> 3000
If not
ngrok http 3000
-
Open the MiniPay app on your phone and click on compass icon.
-
Click on "Test Page" to open the MiniPay test page.
-
Enter the URL of your DApp and click on "Go".
- Ensure the "Connect Wallet" button is hidden when your DApp is loaded inside the MiniPay app, as the wallet connection is implicit.
- Always verify the existence of
window.provider
before initializing your web3 library to ensure seamless compatibility with the MiniPay wallet. - Be cautious about exposing sensitive information or functionality when using public tunneling services like ngrok. Always use them in a controlled environment.
- MiniPay currently supports setting the
feeCurrency
property when runningeth_sendTransaction
. However, currency support is limited tocUSD
. More currencies might be supported in future. - MiniPay only accepts legacy transactions at the moment. EIP-1559 properties won't be considered when handling requests.
- Message signing is not currently supported.
- A developer mode will be available soon, allowing the use of testnet.