Use the isPhantom boolean property to check whether the injected EVM provider is Phantom.
const isPhantomInstalled = window.phantom?.ethereum?.isPhantom; console.log(isPhantomInstalled); // true
Was this page helpful?