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

[ABW-2378] Set current gateway to mainnet after import #812

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

CyonAlexRDX
Copy link
Contributor

@CyonAlexRDX CyonAlexRDX commented Sep 29, 2023

Jira ticket: ABW-2378

Description

Change current network (gateway) to .mainnet after having finished importing a Profile (wallet backup data).

Prevents

General soundness measure, safe to do since all Profiles should contain .mainnet accounts.

How to test

You can use this Profile (requires RDX Works account)

Mnemonic is:

anger dizzy pond category scissors broccoli earth royal palace intact fox engage mix area engage right argue derive promote control hard order silver wait

@@ -25,7 +25,7 @@ public struct ProfileSnapshot:

/// Settings for this profile in the app, contains default security configs
/// as well as display settings.
public let appPreferences: AppPreferences
public private(set) var appPreferences: AppPreferences
Copy link
Contributor Author

@CyonAlexRDX CyonAlexRDX Sep 29, 2023

Choose a reason for hiding this comment

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

Preferably we want the Snapshot to be immutable, but in this case it would just be a hassle to "roundtrip" through Profile in ProfileStore's function changeProfileSnapshot:to, thus we allow this, but still make the setter private, having to go through changeCurrentToMainnetIfNeeded.

@CyonAlexRDX CyonAlexRDX merged commit 8144720 into main Sep 29, 2023
6 checks passed
@CyonAlexRDX CyonAlexRDX deleted the ABW-2378_set_current_GW_to_mainnet_after_import branch September 29, 2023 15:22
This pull request was closed.
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.

3 participants