-
Notifications
You must be signed in to change notification settings - Fork 536
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
Remove deprecated ledger fields #1160
Conversation
In all of the other places we import BigNumber, we make use of the default export. This just makes it consistent across the project. export default BigNumber;
Per XRPLF/rippled#3214 The following fields are deprecated and may be removed without further notice: accepted, hash (use ledger_hash instead), seqNum (use ledger_index instead), totalCoins (use total_coins instead).
Can you remove from relevant code / type definitions as well? Ex: I see
|
Done |
This might technically be a breaking change, but these fields are directly redundant with the snake_case versions and have been deprecated since ~2015. So I think this would be fine to merge |
@@ -67,19 +66,19 @@ function parseState(state) { | |||
* @throws RangeError: Invalid time value (rippleTimeToISO8601) | |||
*/ | |||
export function parseLedger(ledger: Ledger): FormattedLedger { | |||
const ledgerVersion = parseInt(ledger.ledger_index || ledger.seqNum, 10) |
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.
Why are we using parseInt(..., 10)
, could we just use Number(...) if parsing in base 10?
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.
No reason. I suspect Number()
would work equally well, but I'm not 100% sure. It has been parseInt()
from the beginning of time and I think we can leave it that way unless there is some reason to change it.
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.
I'm perfectly happy with parseInt()
, mostly just curious.
Per XRPLF/rippled#3214
The following fields are deprecated and may be removed without further notice: accepted, hash (use ledger_hash instead), seqNum (use ledger_index instead), totalCoins (use total_coins instead).