diff --git a/src/HasWallet.php b/src/HasWallet.php index 6b183db..3b519c8 100644 --- a/src/HasWallet.php +++ b/src/HasWallet.php @@ -46,7 +46,7 @@ public function canWithdraw($amount) */ public function deposit($amount, $type = 'deposit', $meta = []) { - $this->balance += $amount; + $this->wallet->balance += $amount; $this->save(); $this->transactions() @@ -71,7 +71,7 @@ public function withdraw($amount, $type = 'withdraw', $meta = [], $shouldAccept $accepted = $shouldAccept ? $this->canWithdraw($amount) : true; if ($accepted) { - $this->balance += $amount; + $this->wallet->balance += $amount; $this->save(); }