-
Notifications
You must be signed in to change notification settings - Fork 24
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
Fixes actions payload continuously appending #718
Conversation
✅ Deploy Preview for obe-testnet ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for obe-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Deploying with Cloudflare Pages
|
let currentData = ref<string | unknown>(null); | ||
const maxHeight = 57; // the maximum row height | ||
const switchHeight = 20; | ||
const maxHeightStyle = computed(() => |
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 doesn't need to be computed()
since the values don't change or need to be reactive. optionally you could remove the switchHeight
variable which isn't used elsewhere and just have const maxHeightStyle = 37px // comment
whichever you prefer for readability.
const maxHeightStyle = computed(() => | |
const maxHeightStyle = `calc(${maxHeight}px - ${switchHeight}px)`; |
<div class="text-weight-bold">memo: <span class="text-weight-regular" v-if="transferData.memo">{{transferData.memo}}</span><span class="text-weight-regular" v-else>n/a</span></div> | ||
<div | ||
class="relative-position" | ||
:class="{'overflow-hidden': !showOverflow, 'div-compressed': !showOverflow}" |
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.
double-check this but I believe the quasar class overflow-hidden
is redundant now due to div-compressed
(doesn't appear to do anything when disabled in dev tools)
:class="{'overflow-hidden': !showOverflow, 'div-compressed': !showOverflow}" | |
:class="{ 'div-compressed': !showOverflow }" |
Fixes #697
Description
This PR fixes the issue where the content of an action is continuously appended to the table with the following changes:
Why? The request answer sometimes includes keys that are empty and sometimes it doesn't. The diff below illustrates the difference between the request payloads. Fun fact, they also change the order of the attributes, which is not depicted in the example below.
How? We recursively compare the each key since we can't predict the kind of data it will be. We ignore any key that has zero content in the comparison, so the objects are considered the same.
Why? Due to the complexity of the data that can come from the blockchain actions, a new component with the sole purpose of showing this data was created. It leverages recursion because of the lack of predictability on the JSON that comes from the endpoints and makes sure we show a simplified, indented version of the content.
Note that we don't print the information again if it was deemed equal to the previous one.
Test scenarios
Tested on the following transactions:
/transaction/9398eb3fd65179086d2cb571a82299fe16ac545a4724952f3d4dc8f1dd53fcac
/transaction/cb0bc295eab73a01b931463e57f932774a59cddc804acab5e28112845ea4b2d1
/transaction/e058a43cf19d2f736d60cddc046329b179d04fab5121eacce14db7f4db043341
Note that thecontent
key issue will be addressed in another PR/issue/account/eosio.evm
Checklist: