ripple / ripple-binary-codec

Convert between json and hex representations of transactions and ledger entries on the XRP Ledger. Moved to: https://github.com/XRPLF/xrpl.js/tree/develop/packages/ripple-binary-codec
https://github.com/XRPLF/xrpl.js/tree/develop/packages/ripple-binary-codec
ISC License
19 stars 45 forks source link

fix: Encode hex strings length <16 to match rippled #133

Closed natenichols closed 3 years ago

natenichols commented 3 years ago

High Level Overview of Change

Fixes #132.

When rippled decodes Uint64's, it removes leading zeros. This causes issues when encoding JSON objects with ripple-binary-codec.

Context of Change

This PR allows for Uint64's to be hex strings with length 0-16, and then pads leading zeros up to length 16.

Type of Change

Testing

Adds tests for ledger entries described in #132