Optimizing your dApp for Trust Wallet
Users of the Trust Wallet app enjoy the ease and experience of accessing their wallets, assets, and DApps all at the same time. This is made possible through the Trust Wallet DApp browser and WalletConnect. Without needing to swap between apps, users can trade and browse in a fluid, uninterrupted experience.
Optimizing your DApp for the Trust Wallet is an integral part of making sure your project is up to scratch for listing. We recommend that you take a considerable amount of time to ensure fully that your app has at least the basic levels of optimization laid out below.
The Trust Wallet App currently offers the following functionality:
- A Web3 browser for interacting with decentralized applications
- A range of tools to provide a seamless connection between the DApps and the user on the Ethereum, Solana, Cosmos, BNB Smart Chain, Polygon, Osmosis, EVMOS, Aptos and many more EVM and Cosmos compatible networks.
- A fully optimized, integrated interface experience for mobile users
There are simple steps for blockchain developers to implement to take full advantage of these key features. Most are basic tips but none can be missed out.
Familiarity with MetaMask interaction for Ethereum DApps, Phantom for Solana, Keplr for Cosmos or Petra for Aptos puts you off to a good start in terms of optimizing or developing a DApps for Trust Wallet. The web3 development process is the same when using MetaMask/Phantom/Keplr/Petra as a dev tool. It’s our recommended choice for DApp development and gives you a quick, golden rule to use: if it works well with MetaMask, Phantom, Keplr or Petra it works well with Trust Wallet.
It can’t be forgotten that Trust Wallet is accessed by two groups of people: those using the app on Android and those using an iOS device. Your project must be developed to have a mobile-friendly UI as the Trust Wallet inbuilt browser is the primary point of access for the majority of our users.
iOS users require the latest build from Apple App Store. UI/UX design needs to also be considered in your mobile design to provide the best in-wallet experience.
If you have decided upon using MetaMask as your dev tool, do not forget their Provider Migration Guide. This will seriously affect the degree of compatibility between your DApp and the Trust Wallet browser without proper planning.
For Solana integration the best way would be to use the official Wallet Adapter which supports Trust Wallet and include it as the connection point to your DApp.
For Cosmos you can refer to the official Keplr guide, just make sure to use
For Aptos please follow the official Petra guide.
window.trustwallet.aptosis also preferred over
window.aptos, although both will work.
Consider including an explicit Trust Wallet icon or button in your DApp. This will help Trust Wallet users connect to your DApp for the first time.
Recommended steps to improve the user experience when a user clicks or taps the Trust Wallet icon:
- 2.Verify that the DApp is open in desktop browsers or no
window.trustwallet.(ethereum/solana/cosmos/aptos)-> Display the WalletConnect pairing popup
- 3.Verify that the DApp is open in the Trust Wallet DApp browser -> Access the
Trust Wallet users access their wallets on both Android and iOS devices, so your app must be thoroughly tested for both operating systems. Issues may occur on one operating system but not on the other.
This is one of the most important areas to optimize for but is often brushed over. Just open up your DApp with the Trust Wallet browser on both an iOS and Android device, then test the DApps functionalities such as sending or depositing tokens.
There is no native support for Web3 in iOS or Android mobile browsers. Your DApp’s links must be deep links that combine numerous steps into one simple, easy click. Without them, users will need to follow tedious and long chains of links that greatly impact the user experience.