<?php if (!defined('DASHBOARD_ROOT')) { http_response_code(403); exit; } ?> <div class="mny-panel"> <div class="mny-panel-hdr"> <span class="mny-panel-title">Cryptocurrency Wallets</span> <span class="mny-badge info"><?= count($wallets) ?> WALLETS</span> </div> <div class="mny-wal-grid"><?php foreach ($wallets as $wal): ?> <div class="mny-wal"> <div class="mny-wal-curr"><?= UI::e($wal['currency_code'] ?? '???') ?> &mdash; <?= UI::e($wal['label'] ?? 'Unnamed') ?></div> <div class="mny-wal-bal"><?= number_format((float)($wal['balance'] ?? 0), 8) ?> <?= UI::e($wal['currency_code'] ?? '') ?></div> <div class="mny-wal-cad">&asymp; $<?= number_format((float)($wal['balance_cad'] ?? 0), 2) ?> CAD</div> <div class="mny-wal-addr"><?= UI::e($wal['address'] ?? 'PENDING_SETUP') ?></div> <div class="mny-wal-cad" style="margin-top:6px">Last check: <?= $wal['last_checked'] ? date('M j H:i', strtotime($wal['last_checked'])) : 'Never' ?></div> <div class="mny-wal-actions"> <button class="btn btn-primary" onclick="openSendModal('<?= UI::e($wal['currency_code'] ?? '') ?>')">Send</button> <button class="btn btn-ghost" onclick="openTxModal('<?= UI::e($wal['currency_code'] ?? '') ?>')">History</button> </div> </div><?php endforeach; ?> <?php if (empty($wallets)): ?> <div class="mny-empty" style="grid-column:1/-1">No wallets configured on payment server</div><?php endif; ?> </div> </div>  <div id="crypto-send-modal" class="modal" style="display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.8); z-index:9999; align-items:center; justify-content:center;"> <div class="glass" style="width:400px; padding:24px;"> <div style="display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid rgba(255,255,255,0.1); padding-bottom:12px; margin-bottom:16px;"> <h3 style="margin:0; color:#fff;" id="send-modal-title">Send Crypto</h3> <button class="btn-ghost" onclick="document.getElementById('crypto-send-modal').style.display='none'" style="padding:4px;">&times;</button> </div> <div id="send-modal-body"> <div class="form-group" style="margin-bottom:12px;"> <label style="display:block; font-size:10px; color:var(--text-dim); margin-bottom:4px;">To Address</label> <input type="text" id="send-to-addr" class="form-control" style="width:100%; box-sizing:border-box;"> </div> <div class="form-group" style="margin-bottom:16px;"> <label style="display:block; font-size:10px; color:var(--text-dim); margin-bottom:4px;">Amount</label> <input type="number" id="send-amount" step="0.00000001" class="form-control" style="width:100%; box-sizing:border-box;"> </div> <input type="hidden" id="send-currency"> <button class="btn btn-primary" style="width:100%;" onclick="submitCryptoSend()">Confirm Transfer</button> </div> </div> </div>  <div id="crypto-tx-modal" class="modal" style="display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.8); z-index:9999; align-items:center; justify-content:center;"> <div class="glass" style="width:600px; max-height:80vh; overflow-y:auto; padding:24px;"> <div style="display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid rgba(255,255,255,0.1); padding-bottom:12px; margin-bottom:16px;"> <h3 style="margin:0; color:#fff;" id="tx-modal-title">Transaction History</h3> <button class="btn-ghost" onclick="document.getElementById('crypto-tx-modal').style.display='none'" style="padding:4px;">&times;</button> </div> <div id="tx-modal-body" style="font-size:11px; font-family:var(--font-mono);">Loading...</div> </div> </div>  <script src="/assets/js/inline/modules_money_wallets_panel.js"></script>