Wallet discovery: detect Phantom (window.phantom.ethereum) + legacy providers[]
Phantom exposes its EVM provider at window.phantom.ethereum and does not always fire EIP-6963, so the picker never saw it. probeInjected() now folds in Phantom and any window.ethereum.providers[] entries (deduped by identity + name) for both pick() and list(). Phantom added to the mobile in-app-browser hint and the dashboard no-wallet message. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -317,7 +317,7 @@
|
||||
const err=document.getElementById('msgAuthErr');
|
||||
try{
|
||||
const eth=await window.RMCWallet.pick();
|
||||
if(!eth){err.textContent='No wallet found in this browser. On a phone, open your wallet app (SafePal, MetaMask, Trust, Coinbase…), go to its Browser or DApp tab, and type this page\'s address there — your wallet connects automatically.';return;}
|
||||
if(!eth){err.textContent='No wallet found in this browser. On a phone, open your wallet app (SafePal, Phantom, MetaMask, Trust, Coinbase…), go to its Browser or DApp tab, and type this page\'s address there — your wallet connects automatically.';return;}
|
||||
const accs=await eth.request({method:'eth_requestAccounts'});const account=accs[0];
|
||||
const ch=await(await fetch('/api/public/msg-challenge',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({address:account})})).json();
|
||||
if(!ch.message)throw new Error(ch.error||'Could not start sign-in.');
|
||||
|
||||
Reference in New Issue
Block a user