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
refactor: activity generation #5464
Conversation
…activity-generation
Co-authored-by: MarkNerdi <MarkNerdi@users.noreply.github.com>
…/activity-generation
…/activity-generation
…/activity-generation
…/activity-generation
…/activity-generation
…ction Co-authored-by: Jason Kraft <jason.kraft@iota.org>
I've been testing this locally and my activity feed is wiped after ever logout. At first I thought I just needed to make new profiles because my old one's activity list was empty. I created a new profile and minted multiple nfts, which works and displays correctly in the activity list, but when I logged out and then back into the same profile my minted nfts were gone from the activity feed (though they still show in the collectibles tab). |
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.
Just a quick nitpick suggestion
Co-authored-by: Jason Kraft <jason.kraft@iota.org>
Co-authored-by: Jason Kraft <jason.kraft@iota.org>
export function activityOutputContainsValue(wrappedOutput: IWrappedOutput): boolean { | ||
const type = getActivityTypeFromOutput(wrappedOutput) | ||
const typesToCheck = [ActivityType.Basic] | ||
if (typesToCheck.includes(type)) { |
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.
Why is ActivityType.Basic
assigned as a single element array and then searched with includes(type)
when ActivityType.Basic === type
would return the same? Will we eventually add more elements into typesToCheck
?
Great work and LGTM 🔥 Glad we walked through this together this week because this one had lots of moving parts! |
Summary
This PR aims to improve the activity generation.
One improvement is that now multiple outputs of one transaction are taken into account, therefore multiple activities can be generated.
Another improvement is, that we now have the possibility to insert logic for comparing an output with inputs. With this, we can later on add burning/consolidation/voting activities. This also implies that we now dont have to assume the activity action anymore, therefore all activities, for which we dont have the inputs, are classified as "unknown"
Changelog
Relevant Issues
Closes #5348
Testing
Platforms
Instructions
...
Checklist