Fix crypto top-up modal: hoist selectedAmount to module scope so openCryptoModal can read it

Co-Authored-By: 's avatarClaude Sonnet 4.6 <noreply@anthropic.com>
parent 62dd722e
...@@ -245,10 +245,11 @@ ...@@ -245,10 +245,11 @@
</style> </style>
<script> <script>
let selectedAmount = 15;
document.addEventListener('DOMContentLoaded', function () { document.addEventListener('DOMContentLoaded', function () {
// ── Amount buttons ────────────────────────────────────────── // ── Amount buttons ──────────────────────────────────────────
let selectedAmount = 15;
document.querySelectorAll('.amount-btn').forEach(btn => { document.querySelectorAll('.amount-btn').forEach(btn => {
if (parseFloat(btn.dataset.amount) === selectedAmount) btn.classList.add('active'); if (parseFloat(btn.dataset.amount) === selectedAmount) btn.classList.add('active');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment