diff --git a/src/HasWallet.php b/src/HasWallet.php index f51668c..0f2ba82 100644 --- a/src/HasWallet.php +++ b/src/HasWallet.php @@ -119,12 +119,14 @@ public function actualBalance() { $credits = $this->wallet->transactions() ->whereIn('type', ['deposit', 'refund']) + ->where('accepted', 1) ->sum('amount'); $debits = $this->wallet->transactions() ->whereIn('type', ['withdraw', 'payout']) + ->where('accepted', 1) ->sum('amount'); return $credits - $debits; } -} \ No newline at end of file +}