-
Notifications
You must be signed in to change notification settings - Fork 78
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
feat(@desktop/communities) Permissions, 'who holds' section - handling localiezed amounts #7392
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking care of this! It will conflict a bit with #7258 but I will happily integrate it :)
Some minor remarks inline
…g localiezed amounts Closes #7162
a389bb4
to
11c9f7f
Compare
if (Number.isInteger(num)) | ||
return 0 | ||
|
||
return num.toString().split('.')[1].length |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wonder if separator is always '.'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when using toString than yes, it's not localized
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - just one small note.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and approved
What does the PR do
Allows taking from the user and displaying token/collectible amounts using user's locale. Amounts are presented with the same number of significant digits after decimal point as the number provided by the user.
Input
component is used instead ofStatusInput
because the latter one doesn't support qml's buit-in validators.Closes #7162
Affected areas
CommunityNewPermissionView
Screenshot of functionality (including design for comparison)
Screencast.2022-09-15.13.15.02.mp4