-
Notifications
You must be signed in to change notification settings - Fork 24
New Page – Account Settings Update #619
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
base: main
Are you sure you want to change the base?
New Page – Account Settings Update #619
Conversation
pages/services/account-settings.js
Outdated
return { isValid: true, message: '' } // Empty is valid (will be cleared) | ||
} | ||
|
||
const isHex = /^[0-9a-fA-F]+$/.test(trimmed) |
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.
please use isHexString from utils
pages/services/account-settings.js
Outdated
return { isValid: true, message: '' } // Empty is valid (will be cleared) | ||
} | ||
|
||
const isHex = /^[0-9a-fA-F]+$/.test(trimmed) |
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.
use isHexString from utils
pages/services/account-settings.js
Outdated
|
||
const handleSetMessageKey = () => { | ||
const value = messageKeyInput.trim() | ||
const isHex = /^[0-9a-fA-F]+$/.test(value) |
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.
use isHexString from utils
pages/services/account-settings.js
Outdated
const isValid = /^[0-9a-fA-F]{64}$/.test(value) | ||
if (!isValid) { | ||
setErrorMessage('Please enter a valid WalletLocator (64 hexadecimal characters).') | ||
const isHex = /^[0-9a-fA-F]+$/.test(value) |
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.
isHexString from utils
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.
we need to reuse our utils functions
@pandablue0809 the code seems liks unoptimised, some things like seems copy-pasted again.. and we need to reuse the utils function at least for validating hex, we have two functions there already. @Anna15170221 please test if all the things you mentioned now fixed |
@ihomp |
@Anna15170221 please test if all the things you mentioned are now fixed |
@pandablue0809 |
Issue
when we enter something not suitable in the message key field, it just doesn't let us proceed - show some error with explanation or example what we are expecting to get there
The same for wallet Locator
tick-size 1-2 doesn't show any errors - user can't see why it can not press the button