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

Expose make interaction for applying shields function #364

Merged
merged 4 commits into from
Jan 30, 2025

Conversation

micbakos-rdx
Copy link
Contributor

  • Method is exposed in uniffi
  • For now CannotSecurifyEntityHasProvisionalSecurityConfig is not returned when provisional shield is in place since this error should be thrown when a provisional shield exists for that entity but there is also a pending transaction in the queue.
  • Rola key metadata is set after the owner badge is set to the auth zone.

Not authorizing the set metadata update ends in the following error

SystemModuleError(AuthError(Unauthorized(Unauthorized { failed_access_rules: RoleList([(RoleKey { key: "metadata_setter" }, [Protected(BasicRequirement(Require(NonFungible(ResourceAddress(9a4c...6318c6):[5167...1250]))))])]), fn_identifier: PackageAddress(0d90....6318c6):<Metadata>:"set" })))

@micbakos-rdx micbakos-rdx added Rust 🦀 Changes in Rust Sargon UniFFI 🦄 Changes in UniFFI exported APIs labels Jan 30, 2025
@micbakos-rdx micbakos-rdx self-assigned this Jan 30, 2025
@micbakos-rdx micbakos-rdx force-pushed the mib/prepare-for-batch-transactions branch from 306db51 to bf788d9 Compare January 30, 2025 09:10
Copy link

codecov bot commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.63%. Comparing base (c349ccf) to head (7563d70).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #364   +/-   ##
=======================================
  Coverage   92.63%   92.63%           
=======================================
  Files        1177     1177           
  Lines       26572    26566    -6     
  Branches       77       77           
=======================================
- Hits        24614    24609    -5     
+ Misses       1947     1946    -1     
  Partials       11       11           
Flag Coverage Δ
kotlin 97.63% <ø> (ø)
rust 92.29% <100.00%> (+<0.01%) ⬆️
swift 92.86% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@CyonAlexRDX CyonAlexRDX left a comment

Choose a reason for hiding this comment

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

Nice, some minor comments

// TODO change when queue is introduced
// `CannotSecurifyEntityHasProvisionalSecurityConfig` should be returned when
// 1. entity's shield is in provisional state
// 2. interaction is in the queue.
Copy link
Contributor

Choose a reason for hiding this comment

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

When 1. AND 2. Right? I think an update to the comment stating the Boolean AND make it more clear

CommonError::CannotSecurifyEntityHasProvisionalSecurityConfig,
);
}
// if !entities.iter().all(|a| a.get_provisional().is_none()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would copy paste the comment above here too, explaining why code is commented out

@micbakos-rdx micbakos-rdx merged commit 7a3797d into main Jan 30, 2025
13 checks passed
@micbakos-rdx micbakos-rdx deleted the mib/prepare-for-batch-transactions branch January 30, 2025 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rust 🦀 Changes in Rust Sargon UniFFI 🦄 Changes in UniFFI exported APIs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants