Put the price on each Buy button to prevent wrong-package buys

Testers were tapping the highlighted "Most Popular" $50 tile's Buy thinking it
was a general buy, and getting a $50 charge they couldn't afford. Each tile
already buys its own package; label the button "Buy $20" etc. so it's
unambiguous which package a tap purchases.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-08 12:28:06 -05:00
parent cb5c8db2c6
commit 11011c6c51
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1214,7 +1214,7 @@
+ '<div class="bonus">' + (bonus > 0 ? '+' + bonus.toLocaleString() + ' bonus credits' : '&nbsp;') + '</div>' + '<div class="bonus">' + (bonus > 0 ? '+' + bonus.toLocaleString() + ' bonus credits' : '&nbsp;') + '</div>'
+ '<div class="pol">' + (p.costWei ? IAP.fmtPol(p.costWei) + ' POL right now' : 'paused') + '</div>' + '<div class="pol">' + (p.costWei ? IAP.fmtPol(p.costWei) + ' POL right now' : 'paused') + '</div>'
+ '<button class="btn small" data-id="' + p.id + '" data-cost="' + (p.costWei || '') + '"' + '<button class="btn small" data-id="' + p.id + '" data-cost="' + (p.costWei || '') + '"'
+ (p.costWei ? '' : ' disabled') + '>Buy</button>'; + (p.costWei ? '' : ' disabled') + '>Buy $' + Math.round(p.priceCents / 100) + '</button>';
wrap.appendChild(div); wrap.appendChild(div);
} }
wrap.querySelectorAll('button[data-id]').forEach(b => b.addEventListener('click', async () => { wrap.querySelectorAll('button[data-id]').forEach(b => b.addEventListener('click', async () => {
+1 -1
View File
@@ -696,7 +696,7 @@
</div> </div>
<script src="/assets/common.js?v=20260908c"></script> <script src="/assets/common.js?v=20260908c"></script>
<script src="/assets/wallet.js?v=20260908r"></script> <script src="/assets/wallet.js?v=20260908r"></script>
<script src="/assets/my.js?v=20260908l"></script> <script src="/assets/my.js?v=20260908s"></script>
<script src="/assets/chat.js?v=20260907l"></script> <script src="/assets/chat.js?v=20260907l"></script>
</body> </body>
</html> </html>