explorer icon indicating copy to clipboard operation
explorer copied to clipboard

Undefined values in transaction raw JSON visualization solved #358 & …

Open bluntbrain opened this issue 3 years ago • 9 comments

…#452

Undefined values in transaction raw JSON visualization #452 & #358 Bug Fix

Places values from tx instead of undefined in src/rippled/lib/utils.js file.

Bug Fix

This is a Bug fix, mentioned in Issue #358 & #452, showing correct values in place of undefined. This I've verified in both mainnet and testnet

  • [x] Bug fix (non-breaking change which fixes an issue)

Before

before-fix

After

after-fix

bluntbrain avatar Nov 20 '22 14:11 bluntbrain

Kindly review the change and merge this PR cc @ckniffen @mvadari @shawnxie999

bluntbrain avatar Nov 20 '22 14:11 bluntbrain

Should we have a test case for this?

shawnxie999 avatar Nov 23 '22 20:11 shawnxie999

It's just mapping of data already present on the page, hardly 5 line change. Can you check once and merge this PR @shawnxie999 cc @ckniffen @mvadari

bluntbrain avatar Nov 25 '22 04:11 bluntbrain

This is good as an intermediary step. Eventually we want the data shown in the Raw tab to exactly reflect what rippled returned.

ckniffen avatar Nov 28 '22 02:11 ckniffen

Noted. @ckniffen Kindly merge this PR, I'll setup the raw page to exactly reflect what rippled returned and raise a PR soon. Also let me know if anything new needs to be developed, I've some free time in hand and want to contribute to this repo :)

bluntbrain avatar Nov 28 '22 08:11 bluntbrain

I will try to find an push the draft I had created. At first i thought it would be as simple as saving the data to raw earlier. Unfortunately there were a lot of places that references raw to get values and there weren't sufficient tests in place to make me confident I did it all correctly.

ckniffen avatar Nov 28 '22 13:11 ckniffen

Tests are failing. Part of this is much of the test data is mocks of what getTransaction produces. Instead I would in the future like the tests to be raw output from rippled/clio that we then process. This will require a fair amount of work with regards to the transaction specific tests as well as quite a few other places.

There are 17 places that reference properties on raw. When making raw not be the result of formatTransaction only one assertion fails. :(

Luckily most of these these are contained to two components Transaction and SimpleTab.

ckniffen avatar Nov 28 '22 19:11 ckniffen

#479 will get us closer to having proper coverage of SimpleTab to start making more of these changes.

ckniffen avatar Nov 28 '22 21:11 ckniffen

This fix creates a lot of repeated data - e.g. the metadata is now both under tx.meta and meta

mvadari avatar Nov 29 '22 20:11 mvadari

This will require a much more thorough update.

ckniffen avatar Jun 15 '23 22:06 ckniffen