-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Replace kotlin base64 with android base 64 and mock it in unit tests * Make profileStateChanges a shared flow * Remove planting of debug tree * Print errors with timber in example app too * Fix example profile states * Remove checks before asking for biometrics * Suspend request for biometrics until activity is at least started * Report secure storage access error * Make read and write methods public * Make encrypt and decrypt methods public * Implement function to remove a list of keyspecs * Make generateSecretKey public for now * Add error kind for biometrics failure * Export method to derive profile based on bdfs and some accounts * Emit derived profile in profile state change * Store profile state into android state change driver * Make reset keyspec method to regenerate a new key when fail * Included SargonOsManager into sargon android * Make drivers explicit * Replace with new_wallet_with_derived_bdfs * Change doc * Allow set profile to set one profile when none exists * Change iOS test * Fix android test * Fix set_profile to notify ProfileStateChange client about the latest mutated profile * Fix content hint to report correct total amount of personas * Create initial profile with no networks * Delete ephemeral profile when booting * Return error when network does not yet exist * Profile snapshot id payload (#214) * wip * wip * fix test * wip * fix ios tests * test * update * wip * Bump cargo version * Profile safe concurrent access (#225) * wip * fix * fix * wip * wip * wip --------- Co-authored-by: Ghenadie <[email protected]>
- Loading branch information
1 parent
424a98f
commit 817779d
Showing
60 changed files
with
1,461 additions
and
402 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "sargon" | ||
version = "1.1.23" | ||
version = "1.1.24" | ||
edition = "2021" | ||
build = "build.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
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
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
37 changes: 37 additions & 0 deletions
37
crates/sargon/src/profile/v100/header/profile_id_uniffi_fn.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,37 @@ | ||
use crate::prelude::*; | ||
|
||
uniffi::custom_newtype!(ProfileID, Uuid); | ||
|
||
#[uniffi::export] | ||
pub fn new_profile_id_sample() -> ProfileID { | ||
ProfileID::sample() | ||
} | ||
|
||
#[uniffi::export] | ||
pub fn new_profile_id_sample_other() -> ProfileID { | ||
ProfileID::sample_other() | ||
} | ||
|
||
#[cfg(test)] | ||
mod uniffi_test { | ||
|
||
use super::*; | ||
|
||
#[allow(clippy::upper_case_acronyms)] | ||
type SUT = ProfileID; | ||
|
||
#[test] | ||
fn hash_of_samples() { | ||
assert_eq!( | ||
HashSet::<SUT>::from_iter([ | ||
new_profile_id_sample(), | ||
new_profile_id_sample_other(), | ||
// duplicates should get removed | ||
new_profile_id_sample(), | ||
new_profile_id_sample_other(), | ||
]) | ||
.len(), | ||
2 | ||
); | ||
} | ||
} |
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
Oops, something went wrong.