-
Notifications
You must be signed in to change notification settings - Fork 126
feat: Add basic ledger entry page #1146
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
base: staging
Are you sure you want to change the base?
Conversation
## High Level Overview of Change Fix typo for website in english translation ### Context of Change Bug introduced in #1056 ### Type of Change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Refactor (non-breaking change that only restructures code) - [ ] Tests (You added tests for code that already exists, or your new feature included in this PR) - [ ] Documentation Updates - [ ] Translation Updates - [ ] Release ### TypeScript/Hooks Update - [ ] Updated files to React Hooks - [ ] Updated files to TypeScript
| await getLedgerEntry(rippledContext, id) | ||
| return 'entry' |
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.
Is there any way we can cache the result of this method invocation? It feels wasteful to invoke this API only for the purpose of checking if the hash pertains to a transaction, ledger-entry (or) an NFT.
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.
That change should probably be made in a separate PR
| if (resp.error === 'lgrNotFound') { | ||
| throw new Error('invalid ledger index/hash', 400) | ||
| } |
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 RPC command always fetches the last validated ledger. This error cannot possibly occur.
High Level Overview of Change
This PR adds a new type of page for ledger entries/objects. For now it just has a default page that shows all the fields of an object, but over time we can add special ones.
It also:
Detailedtab metadata breakdownAccountpage if the object is an accountContext of Change
Type of Change
TypeScript/Hooks Update
Before / After
Test Plan