Skip to content

Conversation

return { isValid: true, message: '' } // Empty is valid (will be cleared)
}

const isHex = /^[0-9a-fA-F]+$/.test(trimmed)
Copy link
Member

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

return { isValid: true, message: '' } // Empty is valid (will be cleared)
}

const isHex = /^[0-9a-fA-F]+$/.test(trimmed)
Copy link
Member

Choose a reason for hiding this comment

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

use isHexString from utils


const handleSetMessageKey = () => {
const value = messageKeyInput.trim()
const isHex = /^[0-9a-fA-F]+$/.test(value)
Copy link
Member

Choose a reason for hiding this comment

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

use isHexString from utils

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)
Copy link
Member

Choose a reason for hiding this comment

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

isHexString from utils

Copy link
Member

@ihomp ihomp left a 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

@ihomp
Copy link
Member

ihomp commented Sep 28, 2025

@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

@pandablue0809
Copy link
Member Author

@ihomp
i fixed it. plz review again. 🙏

@pandablue0809 pandablue0809 requested a review from ihomp September 30, 2025 11:50
@ihomp
Copy link
Member

ihomp commented Sep 30, 2025

@Anna15170221 please test if all the things you mentioned are now fixed

@Anna15170221
Copy link
Contributor

@pandablue0809
for some reasons I can't set the message key now at all - please check
Screenshot 2025-10-01 at 22 55 39

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

Successfully merging this pull request may close these issues.

3 participants