mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-10-19 10:03:17 -04:00
27 lines
587 B
PHP
27 lines
587 B
PHP
<?php
|
|
/** @phpstan-var \Gazelle\User $Viewer */
|
|
/** @phpstan-var \Twig\Environment $Twig */
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Gazelle;
|
|
|
|
if (MONERO_DONATION_ADDRESS) {
|
|
$moneroDonation = new Donate\Monero();
|
|
$moneroAddr = $moneroDonation->address($Viewer->id());
|
|
} else {
|
|
$moneroAddr = null;
|
|
}
|
|
|
|
if (BITCOIN_DONATION_XYZPUB) {
|
|
$btcDonation = new Donate\Bitcoin();
|
|
$btcAddr = $btcDonation->address($Viewer->id());
|
|
} else {
|
|
$btcAddr = null;
|
|
}
|
|
|
|
echo $Twig->render('donation/index.twig', [
|
|
'bitcoin_address' => $btcAddr,
|
|
'monero_address' => $moneroAddr,
|
|
]);
|