diff --git a/src/Wallet.php b/src/Wallet.php index 471362d..6fe61cc 100755 --- a/src/Wallet.php +++ b/src/Wallet.php @@ -4,6 +4,7 @@ use Brick\Math\Exception\NumberFormatException; use Brick\Math\Exception\RoundingNecessaryException; +use Brick\Money\Context\AutoContext; use Brick\Money\Exception\UnknownCurrencyException; use Brick\Money\Money; use Closure; @@ -215,7 +216,11 @@ public function balanceRaw(bool $cached = true): mixed */ public function balanceAsMoney(): Money { - return Money::of($this->balance(), $this->configuration->getCurrency()); + return Money::of( + $this->balance(), + $this->configuration->getCurrency(), + new AutoContext(), + ); } /** @@ -234,6 +239,7 @@ public function hasBalanceFor(float|int|string $amount): bool return true; } catch (\Exception $e) { report($e); + return false; } }