diff --git a/.changeset/chilled-pots-chew.md b/.changeset/chilled-pots-chew.md new file mode 100644 index 0000000..45137b2 --- /dev/null +++ b/.changeset/chilled-pots-chew.md @@ -0,0 +1,5 @@ +--- +'@node-real/walletkit': patch +--- + +Fix binance web3 wallet successfully detected trustwallet on mobile diff --git a/packages/walletkit/src/evm/wallets/trustWallet/index.tsx b/packages/walletkit/src/evm/wallets/trustWallet/index.tsx index 9141cce..67c7dac 100644 --- a/packages/walletkit/src/evm/wallets/trustWallet/index.tsx +++ b/packages/walletkit/src/evm/wallets/trustWallet/index.tsx @@ -51,5 +51,9 @@ export function trustWallet(props: InjectedEvmWalletOptions = {}): EvmWallet { function getProvider() { if (typeof window === 'undefined') return; + + // binance web3 wallet will inject a trustwallet object with no request on mobile + if (!window?.trustwallet?.request) return; + return window.trustwallet ?? window.trustWallet ?? getEvmInjectedProvider('isTrust'); }