-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: Oracles details events tab 2 #196
Conversation
Deployed to https://pr-196-aescan.stg.aepps.com |
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, and works perfectly. The code is also almost flawless 👍
One additional thing worth taking look at is the fee. In this example either the fee has been changed since the last query or we probably have wrong formatting on one of the values: |
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.
Nice, job well done :)
I discovered it's not a problem of formatting. Any ideas? SHould I consult with MDW team? |
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.
Well, at the end we decided to display only responses and I see the code is still requesting queries.
I would instead use
https://mainnet.aeternity.io/mdw/v2/oracles/ok_qJZPXvWPC7G9kFVEqNjj9NAmwMsQcpRu6E3SSCvCQuwfqpMtN/responses endpoint which provides query and response data
Unfortunately it does not provide any information about block hash or micro time so we will have to remove "Queried At" and "Respond At". All the other data is available in the endpoint.
@michele-franchi Ok, will do. This was my original solution .) |
@michele-franchi
|
src/components/OracleEventsTable.vue
Outdated
:is-collapsed="!isOpened.includes(index)" | ||
@click="toggle(index)"/> | ||
</td> | ||
<td :class="[{'oracle-events-table__data--opened': isOpened.includes(index)}]"> |
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.
This is for styling purposes of the last line, that should not be visible when details are open
This was what confused me |
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.
Please have a look at my comments.
I also noticed the following:
- Pagination does not work
- I get multiple errors in the console when I visit https://pr-196-aescan.stg.aepps.com/oracles/ok_Gb6cD91w29v8csjAxyyBmfAQmdNo1aUedWkhn9HxqiXeVuGcj
- It does not fit well on mobile when the response is expanded:
<dd>{{ formatAePrice(event.queryFee) }}</dd> | ||
|
||
<dt> Query:</dt> | ||
<dd> {{ event.query }}</dd> |
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.
This is a base64 and should be decoded.
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.
fixed
<dd>{{ event.responseTtl }}</dd> | ||
|
||
<dt> Response:</dt> | ||
<dd> {{ event.response }}</dd> |
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.
This is a base64 and should be decoded.
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.
Interesting, the decode function is not working as expected. I will have to investigate.
The pagination is hidden because there are not enough elements. Actually there is no single oracle that would have that many events ./ |
@janmichek I see pagination here: https://pr-196-aescan.stg.aepps.com/oracles/ok_Gb6cD91w29v8csjAxyyBmfAQmdNo1aUedWkhn9HxqiXeVuGcj but It does not work. |
@michele-franchi Right, sorry my fault, I overlooked this. Now I think I made it working. |
All fixed now, also with the UX firefox_4Q14YMzipz.mp4 |
Thanks for another round, just give it a green light .) |
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.
Really nice, approving
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.
It still does not look right to me, for example when I visit https://pr-196-aescan.stg.aepps.com/oracles/ok_2fVpBb8j58mNQcVjY7bwUVpBWZv6AySGDjqepNofU8XGGmEN53 I get different errors:
I think it's because the oracle does not have responses and this should be handled somehow. Also I would suggest to check with middleware why the endpoint is returning 500.
Found out this is a MDW issue aeternity/ae_mdw#1307 Not sure, how should we proceed @michele-franchi |
@janmichek I'm not even talking from a UI perspective, I know we should handle errors properly but I don't expect the code to break. |
@michele-franchi Ok, got it. I created a predecessor of the proper solution #95 just for this entity, so we can reuse my solution later firefox_H0DIgHlZ7x.mp4 |
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.
It still does not work, could you check again?
I see you implemented a way to handle errors from a UI perspective but in my last comment I simply suggested to handle errors from a code perspective.
Right now the code breaks and it executes slice
on undefined. The simple solution would simply have been to not let the code break (avoid slice on undefined) as handling errors from a UI perspective is a wider topic but we can leave it like it is but please check the code 😄
That's another problem presented already in develop, not related to this implementation. I tried to discuss it here. How should we sanitize it? #222 |
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.
It looks good now, let's also have a look at the bug 😄
Good job!
I will solve it separately right after. I will also verify with MDW |
Description
resolves #16
followup #200
Demo
firefox_5BayglKkCB.mp4
Checklist: