-
Notifications
You must be signed in to change notification settings - Fork 1
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
Main Security Shield updates #377
Merged
Merged
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
acc3857
wip
danvleju-rdx f82559a
fix
danvleju-rdx 317c411
add has_any_main_security_structure
danvleju-rdx 8122af1
rename
danvleju-rdx 7dee623
feedback updates
danvleju-rdx eb384dd
feedback updates
danvleju-rdx 5b4060f
Merge branch 'main' into dv/main-security-shield-updates
danvleju-rdx 85cf1ca
bump
danvleju-rdx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
crates/profile/logic/logic_SPLIT_ME/src/logic/profile_security_structure.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use crate::prelude::*; | ||
|
||
pub trait ProfileHasAnyMainSecurityStructure { | ||
/// Returns true if the profile has any main security structure. | ||
fn has_any_main_security_structure(&self) -> bool; | ||
} | ||
|
||
impl ProfileHasAnyMainSecurityStructure for Profile { | ||
danvleju-rdx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
/// Returns true if the profile has any main security structure. | ||
fn has_any_main_security_structure(&self) -> bool { | ||
self.app_preferences | ||
.security | ||
.security_structures_of_factor_source_ids | ||
.iter() | ||
.any(|s| s.is_main()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
jvm/sargon-android/src/main/java/com/radixdlt/sargon/extensions/SecurityStructureMetadata.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.radixdlt.sargon.extensions | ||
|
||
import com.radixdlt.sargon.SecurityStructureMetadata | ||
import com.radixdlt.sargon.securityStructureIsMain | ||
|
||
val SecurityStructureMetadata.isMain | ||
get() = securityStructureIsMain(securityStructureMetadata = this) | ||
Check warning on line 7 in jvm/sargon-android/src/main/java/com/radixdlt/sargon/extensions/SecurityStructureMetadata.kt
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo this can go under the
app_preferences/security_structures/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree 👍