Users

<% if (users.length === 0) { %>

No users

<% } else { %> <% users.forEach(function(u) { %> <% var isActive = selectedUser && u.id === selectedUser.id; %> <% var statusText = u.status === 0 ? '✅' : '❌'; %> <% var seedsParam = seedsUnlocked ? '&seeds=1' : ''; %>
#<%= u.id %> <%= u.username || u.telegram_id %> <%= u.wallet_count %> wallets
<%= statusText %>
<% }); %> <% } %>
<% if (selectedUser) { %>

<%= selectedUser.username || 'User #' + selectedUser.id %> — <%= selectedUser.telegram_id %>

Balances

Main: $<%= Number(selectedUser.total_balance || 0).toFixed(2) %>

Bonus: $<%= Number(selectedUser.bonus_balance || 0).toFixed(2) %>

Available: $<%= Number((selectedUser.total_balance || 0) + (selectedUser.bonus_balance || 0)).toFixed(2) %>

Status: <%= selectedUser.status === 0 ? 'Active' : selectedUser.status === 2 ? 'Blocked' : 'Deleted' %>

Crypto Wallets (<%= wallets.length %>)

<% if (wallets.length === 0) { %> <% } else { %> <% wallets.forEach(function(w) { %> <% }); %> <% } %>
TypeAddressBalanceCreated
No wallets yet
<%= w.wallet_type %> <%= w.address || '' %> <%= Number(w.balance || 0).toFixed(8).replace(/0+$/, '').replace(/\.$/, '.0') %> <%= w.created_at || '-' %>
<% } else { %>

Select a user to view wallets

<% } %>
<% if (hasStats) { %>

Owner Summary

Total USD

$<%= Number(stats.totalUsd).toFixed(2) %>

Users

<%= stats.totalUsers %>

Active Wallets

<%= stats.totalWallets %>

Commission Due

$<%= Number(stats.commissionDue).toFixed(2) %>

Wallet Balances by Currency

<% Object.entries(stats.totals).forEach(function(entry) { %> <% var coin = entry[0]; var balance = entry[1]; %> <% if (balance <= 0 && !(stats.walletCounts[coin] > 0)) return; %> <% }); %>
CoinWalletsBalanceUSD Value
<%= coin.toUpperCase() %> <%= stats.walletCounts[coin] || 0 %> <%= Number(balance).toFixed(8).replace(/0+$/, '').replace(/\.$/, '.0') %> $<%= Number(stats.usdValues[coin] || 0).toFixed(2) %>
Total <%= stats.totalWallets %> $<%= Number(stats.totalUsd).toFixed(2) %>

Commission <%= stats.commissionEnabled ? '' : '(Disabled)' %>

Rate<%= stats.commissionRate %>% of total wallet balances
Total Balances$<%= Number(stats.totalUsd).toFixed(2) %>
Full Commission$<%= Number(stats.currentCommission).toFixed(2) %>
Last Paid$<%= Number(stats.lastPaidAmount).toFixed(2) %>
Due Now$<%= Number(stats.commissionDue).toFixed(2) %>

Commission is <%= stats.commissionRate %>% of total wallet balances. Each payment records a snapshot — if the shop continues running and balances grow, the difference becomes the next payment due.

Pay to: <% Object.entries(stats.commissionWallets).forEach(function(entry) { %> <% if (!entry[1]) return; %>
<%= entry[0] %>: <%= entry[1] %>
<% }); %>
<% if (stats.payments && stats.payments.length > 0) { %>

Payment History

<% stats.payments.forEach(function(p, idx) { %> <% var nextP = stats.payments[idx + 1]; %> <% var delta = p.commission_amount_usd - (nextP ? nextP.commission_amount_usd : 0); %> <% }); %>
DateTotal BalancesCommission @<%= stats.commissionRate %>%PaidDeltaNote
<%= p.created_at ? new Date(p.created_at).toLocaleString() : '-' %> $<%= Number(p.total_balance_usd).toFixed(2) %> $<%= Number(p.commission_amount_usd).toFixed(2) %> $<%= Number(p.paid_amount_usd).toFixed(2) %> <%= delta > 0 ? '+' : '' %>$<%= Number(delta).toFixed(2) %> <%= p.note || '-' %>
<% } %>

Seed Phrases & Wallet Access

<% if (seedsUnlocked) { %>

Seed phrases are unlocked. Download via CSV export.

<% } else { %>
🔒 Seed phrases are encrypted and locked until commission is paid. <% if (stats.commissionDue > 0) { %>

Commission owed: $<%= Number(stats.commissionDue).toFixed(2) %> (<%= stats.commissionRate %>% of current total balances minus last payment).

Record a payment above to unlock access.

<% } else { %>

No wallet balances to calculate commission. Commission will be calculated once users deposit funds.

<% } %>
<% if (stats.seedsPaid) { %> 🔓 Unlock Seed Phrases <% } else { %> 🔒 Unlock requires commission payment <% } %> <% } %>
<% } %>