Trust
Implementation of the WalletConnect protocol. The dAppMeta
prop passed in the ThirdwebProvider
above will be used when connecting to the wallets to show your app's information.
import { trustWallet, ThirdwebProvider } from "@thirdweb-dev/react-native";
import { Ethereum } from "@thirdweb-dev/chains";
const App = () => {
const activeChain = Ethereum;
return (
<ThirdwebProvider
clientId="your-client-id"
activeChain={activeChain}
supportedChains={[activeChain]}
supportedWallets={[
trustWallet({
projectId: "your-wallet-connect-project-id", // optional but we recommend you get your own for production
}),
]}
>
<AppInner />
</ThirdwebProvider>
);
};
options
projectId
The WalletConnect projectId
. You can get one in the WalletConnect portal.
Defaults to a common projectId
set by thirdweb. This should be ok for testing but note that if you want to deploy your mobile app it may make sense to create your own as WalletConnect may throttle traffic coming from the same projectId
.
trustWallet({
projectId: "wc-projectId",
});
recommended (optional)
Show this wallet as "recommended" in the ConnectWallet Modal.
trustWallet({
recommended: true,
});