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

App compatibility with sargon os branch #1098

Merged
merged 5 commits into from
Jul 30, 2024
Merged

App compatibility with sargon os branch #1098

merged 5 commits into from
Jul 30, 2024

Conversation

micbakos-rdx
Copy link
Contributor

Description

This PR aims to achieve compatibility with sargon os branch.

Warning

It is not booting sargon os yet, but makes our app compatible with some structural changes on radixdlt/sargon#176

Changes

  1. More factor sources are included in this sargon branch but not operational. Exhaustive whens are handled appropriately. Code that usually produces a side effect, does nothing for new factor sources, and code that needs to return a value, returns a Result.Failure with an appropriate exception. Keep in mind that such errors will not be thrown since these factor sources are not operational.
  2. Our object DeviceInfo was replaced with HostId and HostInfo. For more information related to those 2 objects in sargon take a look at this pr Implement HostInfo struct sargon#189. In general the id and timestamp it was generated are the only information needed to be preserved (used heavily in the backup feature). The rest can be retrieved on the fly using context or Build information. Check this test profile/src/test/java/rdx/works/profile/data/HostInfoRepositoryTest.kt that tests the compatibility between the previous and the new object that preserves the id of the device.
  3. Some object renamings

How to test

  1. The update should not affect the app. Everything should be operational.
  2. One good test on top of the rest is to have a version of the app with backups enabled. Then update to this version and check that the screen that informs the user that the device was claimed by another device was not shown and backups continue without any problem.

This branch will be merged when radixdlt/sargon#176 is merged to main

@@ -20,7 +20,7 @@ hiltNavigation = "1.2.0"
biometricKtx = "1.2.0-alpha05"
coilCompose = "2.6.0"
kotlinxSerialization = "1.6.2"
sargon = "1.0.31-598a8a45"
sargon = "1.1.0-host_info-777f0b3d"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will be replaced to the actual build from main branch when sargon has sargon_os merged.


companion object {
fun generate() = HostIdEntry(
id = Uuid.randomUUID(),
Copy link
Contributor

Choose a reason for hiding this comment

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

in core we have something called UUIDGenerator. If we use Uuid class from sargon, shouldn't we consistently use one uuid "provider" everywhere?

Copy link
Contributor

@sergiupuhalschi-rdx sergiupuhalschi-rdx left a comment

Choose a reason for hiding this comment

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

Tested on top of a version with backup enabled and it works as expected.

Copy link

sonarcloud bot commented Jul 30, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 40%)

See analysis details on SonarCloud

@micbakos-rdx micbakos-rdx merged commit 9e31bf4 into main Jul 30, 2024
8 of 9 checks passed
@micbakos-rdx micbakos-rdx deleted the sargon_os branch July 30, 2024 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants