From 64169a274efaca72196c60a21f8cdb492fe4fb8d Mon Sep 17 00:00:00 2001 From: Simon Depelchin Date: Thu, 22 Feb 2018 11:40:34 +0100 Subject: [PATCH] Fixing balance update --- src/HasWallet.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); }