Wallet help: SafePal + any-wallet in-app-browser path (not just MetaMask/Trust)
Mobile users on SafePal/Coinbase/Rabby had no route in — the deep-link help only offered MetaMask + Trust. Added a wallet-agnostic instruction (open your wallet app -> Browser/DApp tab -> type the join URL) that works via the injected provider our EIP-6963 picker already resolves; join-now fills the sponsor path into the hint. Dashboard no-wallet message made wallet-agnostic and names SafePal. No guessed SafePal deep-link scheme (unverified). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -24,8 +24,12 @@
|
|||||||
<div id="walletHelp" style="display:none;margin-top:14px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#08192880">
|
<div id="walletHelp" style="display:none;margin-top:14px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#08192880">
|
||||||
<div style="font-weight:800;margin-bottom:6px">📱 On your phone? Open this page inside your wallet app.</div>
|
<div style="font-weight:800;margin-bottom:6px">📱 On your phone? Open this page inside your wallet app.</div>
|
||||||
<p style="color:var(--muted);font-size:13px;margin:0 0 10px">Mobile browsers can't see your wallet — but your wallet app has its own browser that can. Tap your wallet below and this exact page (with the right sponsor) opens inside it, ready to connect:</p>
|
<p style="color:var(--muted);font-size:13px;margin:0 0 10px">Mobile browsers can't see your wallet — but your wallet app has its own browser that can. Tap your wallet below and this exact page (with the right sponsor) opens inside it, ready to connect:</p>
|
||||||
<a id="mmDeep" class="btn btn-secondary" style="width:100%;margin-bottom:8px" href="#">🦊 Open in MetaMask (recommended)</a>
|
<a id="mmDeep" class="btn btn-secondary" style="width:100%;margin-bottom:8px" href="#">🦊 Open in MetaMask</a>
|
||||||
<a id="twDeep" class="btn btn-secondary" style="width:100%" href="#">🛡️ Open in Trust Wallet</a>
|
<a id="twDeep" class="btn btn-secondary" style="width:100%;margin-bottom:10px" href="#">🛡️ Open in Trust Wallet</a>
|
||||||
|
<div style="border-top:1px solid var(--line);padding-top:10px">
|
||||||
|
<div style="font-weight:700;font-size:13px;margin-bottom:4px">📲 Using SafePal, Coinbase Wallet, Rabby, or another app?</div>
|
||||||
|
<p class="micro" style="margin:0">Every wallet app has its own built-in browser — that's how it connects. Open <strong>your wallet app</strong> → find the <strong>Browser</strong> or <strong>DApp</strong> tab (SafePal: the compass/🧭 "DApps" tab at the bottom) → type <strong>rmcircle.team/join/<span id="wbId">…</span></strong> and open it there. Your wallet appears automatically, ready to connect — no matter which wallet you use.</p>
|
||||||
|
</div>
|
||||||
<p class="micro" style="margin:8px 0 0">⚠️ <strong>Trust Wallet bouncing you back here?</strong> Trust's built-in browser is switched off by default. <a href="https://link.trustwallet.com/browser_enable" rel="noopener">Tap here to switch it on</a> (or in Trust: Settings → Preferences → DApp Browser → enable), then tap "Open in Trust Wallet" again.</p>
|
<p class="micro" style="margin:8px 0 0">⚠️ <strong>Trust Wallet bouncing you back here?</strong> Trust's built-in browser is switched off by default. <a href="https://link.trustwallet.com/browser_enable" rel="noopener">Tap here to switch it on</a> (or in Trust: Settings → Preferences → DApp Browser → enable), then tap "Open in Trust Wallet" again.</p>
|
||||||
<p class="micro" style="margin:10px 0 0">Don't have a wallet yet? <a href="/training">Video 2 in the training</a> shows how to set one up safely (2 minutes). On a computer, install the MetaMask browser extension and refresh this page.</p>
|
<p class="micro" style="margin:10px 0 0">Don't have a wallet yet? <a href="/training">Video 2 in the training</a> shows how to set one up safely (2 minutes). On a computer, install the MetaMask browser extension and refresh this page.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -181,6 +181,9 @@ fetch('/api/public/config').then(function(r){return r.json()}).then(function(c){
|
|||||||
var here=location.host+location.pathname+location.search;
|
var here=location.host+location.pathname+location.search;
|
||||||
var mm=$('mmDeep'); if(mm) mm.href='https://metamask.app.link/dapp/'+here;
|
var mm=$('mmDeep'); if(mm) mm.href='https://metamask.app.link/dapp/'+here;
|
||||||
var tw=$('twDeep'); if(tw) tw.href='https://link.trustwallet.com/open_url?coin_id=966&url='+encodeURIComponent(location.href);
|
var tw=$('twDeep'); if(tw) tw.href='https://link.trustwallet.com/open_url?coin_id=966&url='+encodeURIComponent(location.href);
|
||||||
|
// Fill the "type this in your wallet's browser" hint with the sponsor's
|
||||||
|
// real join path so SafePal/Coinbase/etc. users land on the right page.
|
||||||
|
var wb=$('wbId'); if(wb){ var ref=new URLSearchParams(location.search).get('ref'); wb.parentNode.textContent='rmcircle.team'+(ref&&/^\d{1,15}$/.test(ref)?'/join/'+ref:'/join-now'); }
|
||||||
box.style.display='block';
|
box.style.display='block';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -317,7 +317,7 @@
|
|||||||
const err=document.getElementById('msgAuthErr');
|
const err=document.getElementById('msgAuthErr');
|
||||||
try{
|
try{
|
||||||
const eth=await window.RMCWallet.pick();
|
const eth=await window.RMCWallet.pick();
|
||||||
if(!eth){err.textContent='No wallet found in this browser. On a phone, open this page inside your wallet app\'s browser (MetaMask or Trust).';return;}
|
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;}
|
||||||
const accs=await eth.request({method:'eth_requestAccounts'});const account=accs[0];
|
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();
|
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.');
|
if(!ch.message)throw new Error(ch.error||'Could not start sign-in.');
|
||||||
|
|||||||
Reference in New Issue
Block a user