Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

fix/mobile: autocapitalise seed entry #2502

Merged
merged 1 commit into from
Jan 20, 2020
Merged

fix/mobile: autocapitalise seed entry #2502

merged 1 commit into from
Jan 20, 2020

Conversation

cvarley100
Copy link
Contributor

Description

Autocapitalises seed on entry.

Fixes #2501

Type of change

  • Bug fix (a non-breaking change which fixes an issue)

How Has This Been Tested?

Tested on Android and iOS

Checklist:

  • My code follows the style guidelines for this project
  • I have performed a self-review of my own code
  • For changes to mobile that include native code (including React Native modules): I have verified that both iOS and Android successfully build in both Debug and Release modes

Copy link
Contributor

@laumair laumair left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@cvarley100 cvarley100 merged commit f73de78 into develop Jan 20, 2020
@cvarley100 cvarley100 mentioned this pull request Jan 20, 2020
@rajivshah3 rajivshah3 deleted the hotfix/2501 branch January 24, 2020 22:43
@@ -226,10 +226,11 @@ class CustomTextInput extends Component {
onChangeText(value) {
const { isPasswordInput, isSeedInput, onValidTextChange } = this.props;
if (isSeedInput) {
if (value && !value.match(VALID_SEED_REGEX)) {
const valueCapitalized = value.toUpperCase()
if (valueCapitalized && !valueCapitalized.match(VALID_SEED_REGEX)) {
Copy link

Choose a reason for hiding this comment

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

Both before this change and after -- so if valueCapitalized is "", the regex-check won't trigger, and the empty seed will go to onValidTextChange -- ?

Copy link

Choose a reason for hiding this comment

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

Should probably be

if (!valueCapitalized || !valueCapitalized.match(VALID_SEED_REGEX)) {
    return;
}

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

Successfully merging this pull request may close these issues.

Seed should be autocapitalised
3 participants