Skip to content

Special text for re-verification after update#8462

Merged
BillCarsonFr merged 1 commit into
developfrom
feature/bca/fix_8445
May 24, 2023
Merged

Special text for re-verification after update#8462
BillCarsonFr merged 1 commit into
developfrom
feature/bca/fix_8445

Conversation

@BillCarsonFr
Copy link
Copy Markdown
Member

@BillCarsonFr BillCarsonFr commented May 23, 2023

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Fixes #8445

If you have a read only device (not all secrets available):
image

After the migration to rust you will need to re-verify, the text is updated like this in this case
image

Motivation and context

Screenshots / GIFs

Tests

  • Step 1
  • Step 2
  • Step ...

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@BillCarsonFr BillCarsonFr requested a review from bmarty May 23, 2023 11:10
Copy link
Copy Markdown
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

Just a remark, else LGTM.
(Tests seem to be failing).


private fun handleAppStarted() {
// On the first run with rust crypto this would be false
if (!vectorPreferences.isOnRustCrypto()) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think you need to test BuildConfig.FLAVOR == "rustCrypto" also:

Suggested change
if (!vectorPreferences.isOnRustCrypto()) {
if (BuildConfig.FLAVOR == "rustCrypto" && !vectorPreferences.isOnRustCrypto()) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think it's ok now, isOnRustCrypto will pass to true only if you run once on the new rust flavor.
If you have a logged in session before that it will store that you had legacy data, and in the check for the popup we do that check:

vectorPreferences.isOnRustCrypto() && vectorPreferences.hadExistingLegacyData()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

OK. My point was that the code in the if block will run every time on the KotlinCrypto version. Not a big deal of course.

}

if (BuildConfig.FLAVOR == "rustCrypto") {
vectorPreferences.setIsOnRustCrypto(true)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This line could then be moved at the end of the previous if block.

@sonarqubecloud
Copy link
Copy Markdown

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

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.

Sometimes after migrating to rust crypto, the App requires users to re-verify the device

2 participants