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

add scramble pin toggle #962

Merged
merged 2 commits into from
Apr 27, 2022
Merged

add scramble pin toggle #962

merged 2 commits into from
Apr 27, 2022

Conversation

deregs
Copy link
Contributor

@deregs deregs commented Apr 23, 2022

Description

Adds toggle in Security settings to choose whether pin numbers should be scrambled.

Because all current users' pins are scrambled, made it so that default state is scrambledPin = true

Also changed the Security Settings view to use a class instead of a function in order to remain consistent with the rest of the views, and also to make it easier to inject SettingsStore. Without injecting SettingsStore I was running into bugs.

This pull request is categorized as a:

  • New feature
  • Bug fix
  • Code refactor
  • Configuration change
  • Locales update
  • Other

Checklist

  • I’ve run npm run tsc and made sure my code compiles correctly
  • I’ve run npm run lint and made sure my code didn’t contain any problematic patterns
  • I’ve run npm run prettier and made sure my code is formatted correctly
  • I’ve run npm run test and made sure all of the tests pass

Testing

If you added new functionality or fixed a bug, did you add new unit tests?

  • No, I’m a fool
  • Yes
  • N/A

I have tested this PR on the following platforms (please specify OS version and phone model/VM):

  • Android
  • iOS

I have tested this PR with the following types of nodes (please specify node version and API version where appropriate):

  • LND
  • c-lightning-REST
  • spark
  • Eclair
  • LndHub

Locales

  • I’ve added new locale text that requires translations
  • I’m aware that new translations should be made on the Zeus Transfix page and not directly to this repo

Third Party Dependencies and Packages

  • Contributors will need to run npm install after this PR is merged in
  • 3rd party dependencies have been modified:
    • verify that package.json and package-lock.json have been properly updated
    • verify that dependencies are installed for both iOS and Android platforms

Other:

  • Changes were made that require an update to the README
  • Changes were made that require an update to onboarding

@@ -340,24 +341,11 @@ export default class AddEditNode extends React.Component<
enableTor
};

setSettings(
Copy link
Contributor

Choose a reason for hiding this comment

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

why is setSettings ripped out here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's no purpose to this call as far as I can see, we're just getting the settings and setting it to the exact same settings. Which makes sense, when copying the node config nothing in the settings changes. The copied node is only added to settings once save node config is pressed on the copied configuration.

fontFamily: 'Lato-Regular'
}}
>
{'Scramble PIN numbers'}
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be added to locales/en.json

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@Bosch-0
Copy link
Contributor

Bosch-0 commented Apr 25, 2022

I'd recommend this be off by default and have it opt-in for a better UX

@deregs
Copy link
Contributor Author

deregs commented Apr 25, 2022

@Bosch-0 I agree, but discussed with @kaloudis and we thought for now it should default to scrambled. Since all current users have scramble PIN on, we want to avoid defaulting to non-scrambled and unscrambling current users' pins. Ideally, we could design out a create pin flow that includes the scramble pin toggle so the user can just decide scrambled/non-scrambled off the bat. It also might make more sense to users if they could toggle scrambled on/off during pin creation and see the numbers on the pin pad get scrambled/unscrambled and decide which they prefer.

@kaloudis kaloudis merged commit beb6886 into ZeusLN:master Apr 27, 2022
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.

3 participants