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

Transaction Analysis allow unknown accounts #307

Merged
merged 5 commits into from
Dec 18, 2024
Merged

Conversation

GhenadieVP
Copy link
Contributor

Allow transaction manifests which contain unknown accounts which to require signatures. The Wallet should not reject such transactions.

References:

The new behaviour was introduced with Sargon, and we reject the manifest at the moment we try to extract the public keys to be sent to the GW. Old implementation, did allow for unknown accounts, see iOS for reference.

RoleKind::Primary,
);

assert!(matches!(result, Err(CommonError::UnknownAccount)));
assert!(matches!(result, Err(CommonError::UnknownPersona)));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Still invalid for unknown persona. We might change it in the future, but feels strange for a manifest to contain an unknown persona.

Comment on lines +20 to +21
.filter_map(|a| a.ok())
.collect::<Vec<_>>();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The actual fix.

Copy link

codecov bot commented Dec 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.3%. Comparing base (7b5f183) to head (460753c).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #307   +/-   ##
=====================================
  Coverage   93.3%   93.3%           
=====================================
  Files       1109    1109           
  Lines      23547   23548    +1     
  Branches      79      79           
=====================================
+ Hits       21974   21975    +1     
  Misses      1558    1558           
  Partials      15      15           
Flag Coverage Δ
kotlin 97.1% <ø> (ø)
rust 92.8% <100.0%> (+<0.1%) ⬆️
swift 94.8% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ctor_of_instances_required_to_sign_transactions.rs 66.6% <ø> (ø)
...rgon/src/signing/collector/signatures_collector.rs 88.1% <ø> (ø)
...rc/signing/extractor_of_entities_requiring_auth.rs 100.0% <100.0%> (ø)
...s/sargon/src/system/sargon_os/sargon_os_signing.rs 64.8% <ø> (ø)
..._os/transactions/sargon_os_transaction_analysis.rs 83.1% <ø> (ø)

@GhenadieVP GhenadieVP force-pushed the allow_unknown_accounts branch from fed6826 to e7580ad Compare December 17, 2024 13:04
@GhenadieVP GhenadieVP force-pushed the allow_unknown_accounts branch from c544fe3 to a3ed621 Compare December 17, 2024 15:14
@GhenadieVP GhenadieVP merged commit 6a4b46e into main Dec 18, 2024
13 checks passed
@GhenadieVP GhenadieVP deleted the allow_unknown_accounts branch December 18, 2024 09:25
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.

6 participants