Commit bd454553 authored by Simeon Kerkola's avatar Simeon Kerkola Committed by GitHub

Chore: Use optional chaining (#3795)

Use optional chaining to check `window.ethereum` object chain.
parent 4274db67
......@@ -215,7 +215,7 @@ export default function WalletModal({
// get wallets user can switch too, depending on device/browser
function getOptions() {
const isMetamask = window.ethereum && window.ethereum.isMetaMask
const isMetamask = !!window.ethereum?.isMetaMask
return Object.keys(SUPPORTED_WALLETS).map((key) => {
const option = SUPPORTED_WALLETS[key]
// check for mobile options
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment