-
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
Account locker in manifest summary encountered entities #213
Conversation
address_union!( | ||
/// A tagged union of all the encountered addresses in the manifest. | ||
/// This is to be primarily used for the "using dApps" section of the wallet's tx review screen. | ||
enum ManifestEncounteredAddress: component, locker |
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.
I'm not sure about the enum name
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.
Did you ask Omar if there is any other address which belongs here?
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.
No, I didn't ask, but should we add other types even if we don't need them in the wallets right now? It will be quite easy to add a new address type when required.
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.
Let's not add other types for now, the logic in the Wallet to display the "used dApps" is explicitly for globalGenericComponents + account locker.
At some point, RET had a field called userApplications
in summary, meant to point that these potentially have associated dApps. Maybe we can have the field in the execution summary more specific to potential dApps used, rather than generic ManifestEncounteredAddress
, which presumably, by the name, should include all addresses
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.
@GhenadieVP do you have an example? I agree, but I still can't think of a better name to reflect what you described, UserApplicationAddress
doesn't sound better and it lacks context (as the keyword manifest
offers).
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.
Isn't it too generic? I mean that we are filtering the original addresses after all
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.
At first, I thought that AddressReferencedInTX
is more specific, but now that I think of it all of the addresses referenced in a manifest are referenced in the transaction so I guess you're right and it's better to put emphasis on the fact that the addresses are of components
. I'll rename it to ManifestEncounteredComponentAddress
.
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.
but it is not component addresses. LockerAddress
is not ComponentAddress
right?
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.
Yes, it's not a component address, but locker is a component, right? But I see what you're saying and that's why I didn't use component
when naming it initially.
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.
Now the component
keyword expresses that it's not just encountered addresses, but addresses of components (not resources or other types of addresses there are). I'd leave it as is unless someone has other suggestions that reflect the fact that the addresses were filtered to match this criteria.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #213 +/- ##
=====================================
Coverage 97.4% 97.4%
=====================================
Files 932 938 +6
Lines 14954 15005 +51
Branches 64 66 +2
=====================================
+ Hits 14572 14623 +51
Misses 375 375
Partials 7 7
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Good job!
Missing sample values. Can you also Swift and Kotlinify this.
In Swift conform to Address protocol, see https://github.com/radixdlt/sargon/blob/main/apple/Sources/Sargon/Extensions/Swiftified/Address/AddressOfAccountOrPersona%2BSwiftified.swift
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.
LGTM ! Good job
@@ -139,6 +139,13 @@ jobs: | |||
steps: | |||
- uses: RDXWorks-actions/checkout@main | |||
|
|||
- name: Remove old xcode versions |
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.
We can try this.
But it is possible this breaks test Swift - and possible it works for most runs but fails for some due to non determinism.
If we have troubles we can change so that Kotlin tests are run AFTER Swift tests:
Which can be done by using needs: test-Swift
No description provided.