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

ZEUS-2683: Storage: migrate from react-native-encrypted-storage to react-native-keychain #2687

Merged
merged 10 commits into from
Jan 25, 2025

Conversation

kaloudis
Copy link
Contributor

@kaloudis kaloudis commented Dec 30, 2024

Description

Relates to issue: ZEUS-2683, ZEUS-2475

This pull request is categorized as a:

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

Checklist

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

Testing

If you modified or added a utility file, 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):

  • Embedded LND
  • LND (REST)
  • LND (Lightning Node Connect)
  • Core Lightning (CLNRest)
  • LndHub
  • [DEPRECATED] Core Lightning (c-lightning-REST)
  • [DEPRECATED] Core Lightning (Spark)
  • [DEPRECATED] Eclair

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 yarn after this PR is merged in
  • 3rd party dependencies have been modified:
    • verify that package.json and yarn.lock 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

@kaloudis kaloudis added Dependencies Pull requests that update a dependency file Storage Local device storage labels Dec 30, 2024
@kaloudis kaloudis marked this pull request as ready for review December 30, 2024 03:23
@kaloudis kaloudis added this to the v0.9.5 milestone Dec 30, 2024
@kaloudis kaloudis marked this pull request as draft December 30, 2024 22:44
@kaloudis kaloudis force-pushed the zeus-2683 branch 4 times, most recently from 77ae325 to daf3cab Compare December 31, 2024 04:25
@kaloudis kaloudis marked this pull request as ready for review December 31, 2024 04:32
@kaloudis kaloudis force-pushed the zeus-2683 branch 3 times, most recently from c772e58 to 72b7af8 Compare January 17, 2025 14:52
'LAST_CHANNEL_BACKUP_TIME',
`${new Date()}`
);
await Storage.setItem('LAST_CHANNEL_BACKUP_STATUS', status);
Copy link
Contributor

Choose a reason for hiding this comment

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

why didn't we change the key here to variable LAST_CHANNEL_BACKUP_STATUS

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's the same.

Note that there are two keys here: LAST_CHANNEL_BACKUP_STATUS and LAST_CHANNEL_BACKUP_TIME

Copy link
Contributor

@shubhamkmr04 shubhamkmr04 left a comment

Choose a reason for hiding this comment

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

It looks like POS migration didn't complete properly. We get errors when trying to add category or products
Error saving category: [TypeError: existingCategories.find is not a function (it is undefined)]

@kaloudis
Copy link
Contributor Author

It looks like POS migration didn't complete properly. We get errors when trying to add category or products Error saving category: [TypeError: existingCategories.find is not a function (it is undefined)]

Good catch. Fixed.

@kaloudis kaloudis requested a review from shubhamkmr04 January 23, 2025 02:13
Copy link
Contributor

@shubhamkmr04 shubhamkmr04 left a comment

Choose a reason for hiding this comment

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

Simulator Screenshot - iPhone 16 Pro Max - 2025-01-23 at 14 27 49
Simulator Screenshot - iPhone 16 Pro Max - 2025-01-23 at 13 51 53

Still having such issues in POS categories and in contacts

@kaloudis
Copy link
Contributor Author

kaloudis commented Jan 24, 2025

Items to test:

  • General settings
  • Node / wallet connections
  • LNC connections
  • Notes
  • Contacts
  • Currencies
  • LSP orders
  • Selected units
  • POS categories + products
  • Hidden accounts
  • Lightning address
  • Channel backup status
  • Embedded LND seed is backed up flag
  • Activity filters

In testing, try removing and adding items, where applicable

@kaloudis
Copy link
Contributor Author

kaloudis commented Jan 25, 2025

b217c29

  • General settings
  • Node / wallet connections
  • LNC connections
  • Notes
  • Contacts
  • Currencies
  • LSP orders
  • Selected units
  • POS categories + products
  • Hidden accounts
  • Lightning address
  • Channel backup status
  • Embedded LND seed is backed up flag
  • Activity filters

Copy link
Contributor

@shubhamkmr04 shubhamkmr04 left a comment

Choose a reason for hiding this comment

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

tACK

@kaloudis kaloudis merged commit 28671f1 into ZeusLN:master Jan 25, 2025
4 checks passed
@kaloudis kaloudis deleted the zeus-2683 branch January 25, 2025 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependencies Pull requests that update a dependency file Storage Local device storage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Storage: migrate from react-native-encrypted-storage to react-native-keychain
3 participants