Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(api): ensure balance is captured as number of cents when user account created #1544

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

jan-molak
Copy link
Contributor

Hi Team!

I noticed that when a user account is created via a POST request with balance specified in the payload correctly as number, isUserValidator converts this value to string.
This results in the createUser saving incorrect data type to database.json, which then prevents the NavDrawer from formatting the value, and causes the entire UI to crash.

This patch ensures that whenever a user account is created programmatically, the balance is correctly stored as number.

@CLAassistant
Copy link

CLAassistant commented Apr 15, 2024

CLA assistant check
All committers have signed the CLA.

@cypress-app-bot
Copy link

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jan-molak Thanks for the fix and adding a test 😄

@jennifer-shehane jennifer-shehane merged commit 1b451ca into cypress-io:develop Apr 16, 2024
10 checks passed
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.

None yet

4 participants