Fix some bugs

- Remove json ld seo because it can be xss attacked and isn't needed
anyways
- Add try catch to sweep_all function incase error (for example: if tip
is too small, it can't cover the fee)
- Add note about tips being too small that they cant send in FAQ on
contact page
This commit is contained in:
dev 2021-08-06 16:50:23 -07:00
parent e6cc674ee8
commit f792803c99
4 changed files with 16 additions and 12 deletions

View File

@ -82,16 +82,20 @@ class ProcessPayments implements ShouldQueue
foreach ($memes as $meme) {
$balance = $walletRPC->get_balance($meme->account_index);
if ($balance['balance'] === $balance['unlocked_balance']) {
$send_funds = $walletRPC->sweep_all($meme->user->address, '', $meme->account_index);
if ($send_funds['amount_list']) {
$tip = new Tip;
$tip->meme_id = $meme->id;
$tip->amount = $send_funds['amount_list'][0];
$tip->txid = $send_funds['tx_hash_list'][0];
$tip->is_deposit = 0;
$tip->save();
$meme->payment_pending = 0;
$meme->save();
try {
$send_funds = $walletRPC->sweep_all($meme->user->address, '', $meme->account_index);
if ($send_funds['amount_list']) {
$tip = new Tip;
$tip->meme_id = $meme->id;
$tip->amount = $send_funds['amount_list'][0];
$tip->txid = $send_funds['tx_hash_list'][0];
$tip->is_deposit = 0;
$tip->save();
$meme->payment_pending = 0;
$meme->save();
}
} catch (\Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
}
}

View File

@ -8,6 +8,7 @@
<hr>
<h3>I recieved a tip but I haven't been paid yet. When will I get paid?</h3>
<p>Payments usually go out a few times an hour however there can be a delay. Please submit an issue if you have not been paid after 24 hours.</p>
<p>If the tip is too small, it may not be able to send if it does not cover the fee. You can fix this by sending a tip to cover the fee.</p>
<hr>
<h3>Is this website created by Monero?</h3>
<p>Monero is a decentralized organization. This website was created by a developer who likes Monero and should not be seen as "official".</p>

View File

@ -5,7 +5,7 @@
<div class="row justify-content-center">
<div class="col-md-8">
@if (session('submitted'))
<div class="alert alert-success" role="alert">
<div class="alert alert-primary" role="alert">
{{ session('submitted') }}
</div>
@endif

View File

@ -6,7 +6,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
{!! SEOMeta::generate() !!}
{!! OpenGraph::generate() !!}
{!! JsonLd::generate() !!}
<!-- CSRF Token -->
<meta name="csrf-token" content="{{ csrf_token() }}">
<!-- Scripts -->