diff --git a/private/join-now.html b/private/join-now.html
index 14f83d6..15a1b33 100644
--- a/private/join-now.html
+++ b/private/join-now.html
@@ -27,6 +27,13 @@
diff --git a/public/chat.js b/public/chat.js
index 17b855d..67c507a 100644
--- a/public/chat.js
+++ b/public/chat.js
@@ -21,7 +21,7 @@
{k:['metamask','wallet','create wallet','install','set up wallet','setup wallet'],
a:()=>`Install MetaMask only from the
official site or your device's official app store, then create your wallet.
Video 2 in the training walks through it step by step. Never share your Secret Recovery Phrase with anyone β not the team, not this site, not a "support agent".`},
{k:['fund','funding','buy pol','get pol','deposit','exchange','transfer','send pol'],
- a:()=>`You'll need about ${pol()} POL plus a little extra for gas, on Polygon Mainnet.
Video 3 in the training shows how to fund your wallet. Double-check you're sending POL on the Polygon network β not another chain.`},
+ a:()=>`You'll need about ${pol()} POL plus a little extra for gas, on Polygon Mainnet.
Video 3 in the training shows how to fund your wallet. Brand new to crypto? You can buy POL directly with a debit/credit card, Apple Pay, or Google Pay via
MoonPay β pick POL on the Polygon network and send it to your own wallet address. The join page also offers this automatically if your connected wallet is short. Double-check you're getting POL on Polygon β not another chain.`},
{k:['join','buy','purchase','premium position','enter','sign up','signup','register','get started','start'],
a:()=>`Ready to join? Go to the
Getting Started page β it shows the current team sponsor and lets you connect your wallet and buy your position right on the site, with the sponsor ID filled in automatically.
Video 4 in the training walks through the whole process (and Video 5 covers the dApp backup method).`},
{k:['sponsor','current sponsor','who do i join under','placement','whose link','referral'],
diff --git a/public/join-now.js b/public/join-now.js
index 123cf8e..c893d02 100644
--- a/public/join-now.js
+++ b/public/join-now.js
@@ -57,7 +57,26 @@
}catch(e){ $('sponsorLine').textContent='Could not load the current sponsor β please refresh.'; }
}
- async function refreshBalance(){ try{ var b=await req('eth_getBalance',[account,'latest']); $('bal').textContent=polStr(BigInt(b))+' POL'; }catch(e){} }
+ var lastBal=null;
+ async function refreshBalance(){ try{ var b=await req('eth_getBalance',[account,'latest']); lastBal=BigInt(b); $('bal').textContent=polStr(lastBal)+' POL'; updateFundBox(); }catch(e){} }
+
+ // Card on-ramp: shown only when the connected wallet can't cover the entry.
+ function updateFundBox(){
+ var box=$('fundBox'); if(!box||!costs||lastBal===null) return;
+ var need=regValue();
+ if(lastBal>=need){ box.style.display='none'; return; }
+ var shortPol=Math.max(62,Math.ceil(Number(need-lastBal)/1e18)+5);
+ $('fundMsg').textContent='This wallet holds '+polStr(lastBal)+' POL; the Premium entry is '+polStr(need)+' POL plus a little gas. You can buy the remaining ~'+shortPol+' POL with a debit/credit card, Apple Pay, or Google Pay β delivered straight to this wallet.';
+ box.dataset.pol=shortPol;
+ box.style.display='block';
+ }
+ async function openMoonpay(){
+ try{
+ var box=$('fundBox');
+ var r=await (await fetch('/api/public/moonpay-url?address='+encodeURIComponent(account||'')+'&pol='+encodeURIComponent((box&&box.dataset.pol)||''))).json();
+ if(r&&r.url){ window.open(r.url,'_blank','noopener'); log(r.signed?'MoonPay opened in a new tab with your wallet address pre-filled β complete the purchase there, then come back and refresh your balance.':'MoonPay opened in a new tab. Choose POL on the Polygon network and paste YOUR wallet address ('+account+') as the destination, then come back and refresh your balance.','ok'); }
+ }catch(e){ log('Could not open MoonPay: '+(e.message||e),'err'); }
+ }
async function connect(){
try{
@@ -133,5 +152,7 @@
loadSponsor();
$('connectBtn').addEventListener('click',connect);
$('joinBtn').addEventListener('click',doJoin);
+ var fb=$('fundBtn'); if(fb)fb.addEventListener('click',openMoonpay);
+ var fr=$('fundRefresh'); if(fr)fr.addEventListener('click',function(){ log('Checking your balanceβ¦'); refreshBalance(); });
});
})();
diff --git a/public/start.html b/public/start.html
index 4029c85..bfc7e2f 100644
--- a/public/start.html
+++ b/public/start.html
@@ -5,7 +5,7 @@