Skip to content

Branch k#16

Open
namkhanh-le wants to merge 7 commits into
web-development-mart:mainfrom
iulian0o:branch-K
Open

Branch k#16
namkhanh-le wants to merge 7 commits into
web-development-mart:mainfrom
iulian0o:branch-K

Conversation

@namkhanh-le

Copy link
Copy Markdown

Bug fixes

createBalanceAmount was checking amount < 0 before checking isFinite, meaning NaN and -Infinity could slip through in the wrong order. Fixed.
createAccountHoldername had a typo in the function name (lowercase n) — fixed to createAccountHolderName.

Code quality

Extracted two reusable helper functions (assertFinitePositive, assertMinimumBalance) to eliminate repeated validation logic across withdraw, transfer, and createAccount.
Added validation for deposit and transfer amount values (they were never checked for being negative or infinite).
Consistent punctuation and clearer error messages throughout.
Cleaner formatting with section comments to separate helpers, factories, and operations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants