Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Edrisym committed Nov 15, 2024
1 parent cbfe173 commit 57ce843
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion EWallet.Api/Common/Models/Wallet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ public static Wallet Create(decimal balance, Currency currency)
InsufficientInitialBalanceException.Throw(balance);

ArgumentNullException.ThrowIfNull(currency);
if (!IsValidRatio(currency)) InvalidCurrencyRatioException.Throw(currency.Ratio);
if (!IsValidRatio(currency))
InvalidCurrencyRatioException.Throw(currency.Ratio);

return new Wallet
{
Id = Guid.NewGuid(),
Balance = balance,
Currency = currency,
CurrencyId = currency.Id,
Status = WalletStatus.UnderReview.ToString(),
CreatedOnUtc = DateTime.UtcNow,
};
Expand Down

0 comments on commit 57ce843

Please sign in to comment.