-
Notifications
You must be signed in to change notification settings - Fork 27
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
[explorer] task: hide hash lock section #1137
Conversation
✅ Deploy Preview for explorer-dev ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@AnthonyLaw looks good 👍 Hash lock information is visible for aggregate bonded (in the partial and confirmed state): The hash lock section is not visible for other transaction types: |
src/views/PageAssembler.vue
Outdated
if (Array.isArray(data)) { | ||
return !!data.length; | ||
} else { | ||
return !!Object.keys(data).length |
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 guess this should work also for arrays, so nested if
statement is not necessary 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.
Also I would suggest to change this part only to return false
when hideEmptyData
is true and Object.keys(data).length
is 0.
Otherwise when hideEmptyData
is positive, we will never reach the part below (and all errored views will be rendered):
[L138] if (item.hideOnError && this.getter(item.managerGetter)?.error)
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.
Also I would suggest to change this part only to return
false
whenhideEmptyData
is true andObject.keys(data).length
is 0.
Otherwise whenhideEmptyData
is positive, we will never reach the part below (and all errored views will be rendered):
[L138] if (item.hideOnError && this.getter(item.managerGetter)?.error)
that makes sense 👍🏼
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.
👍
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.
looks good 👍
8119adb
to
c61a7e7
Compare
What was the issue?
What's the fix?
hideEmptyData
issue.