From 36dd47963c6a5c1008ce63d1c20baf86a01a9bae Mon Sep 17 00:00:00 2001 From: Abdelmjid Saber <87904671+megoxv@users.noreply.github.com> Date: Sat, 7 Sep 2024 15:11:26 +0300 Subject: [PATCH] fix issues --- src/Services/FilamentWithdrawalFormBuilder.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Services/FilamentWithdrawalFormBuilder.php b/src/Services/FilamentWithdrawalFormBuilder.php index bf6fcd8..c313f06 100644 --- a/src/Services/FilamentWithdrawalFormBuilder.php +++ b/src/Services/FilamentWithdrawalFormBuilder.php @@ -156,9 +156,9 @@ public function send(array $data): void // Check if user is authenticated and validate wallet balance if (auth('accounts')->check()) { $user = auth('accounts')->user(); - $wallet = $user->getWallet(); + $wallet = $user->wallet; - if ($amount > $wallet->balanceFloatNum) { + if ($amount > $wallet->balance) { Notification::make() ->title(trans('filament-withdrawals::messages.withdrawal_requests.notification.balance_is_not_enough.title')) ->body(trans('filament-withdrawals::messages.withdrawal_requests.notification.balance_is_not_enough.body'))