Undefined values in transaction raw JSON visualization solved #358 & …
…#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

After
Kindly review the change and merge this PR cc @ckniffen @mvadari @shawnxie999
Should we have a test case for this?
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
This is good as an intermediary step. Eventually we want the data shown in the Raw tab to exactly reflect what rippled returned.
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 :)
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.
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.
#479 will get us closer to having proper coverage of SimpleTab to start making more of these changes.
This fix creates a lot of repeated data - e.g. the metadata is now both under tx.meta and meta
This will require a much more thorough update.