Try to fix bug with sending payments

This commit is contained in:
dev 2021-08-07 19:34:37 -07:00
parent 4549923b4f
commit 163e049aff

View File

@ -81,7 +81,7 @@ class ProcessPayments implements ShouldQueue
$memes = Meme::where('payment_pending', 1)->get();
foreach ($memes as $meme) {
$balance = $walletRPC->get_balance($meme->account_index);
if ($balance['balance'] === $balance['unlocked_balance']) {
if ($balance['unlocked_balance'] > 0 && $balance['balance'] === $balance['unlocked_balance']) {
try {
$send_funds = $walletRPC->sweep_all($meme->user->address, '', $meme->account_index);
if ($send_funds['amount_list']) {