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

Filter undefined #105

Closed natenichols closed 4 years ago

natenichols commented 4 years ago

High Level Overview of Change

Omit fields with undefined values when encoding.

Context of Change

xpring-common-js has objects in the form

{ Memo: {
    MemoData: undefined,
    .....

The change @amiecorso, @intelliot, and I decided on was to omit fields with undefined values.

Type of Change

Test Plan

Added a test with undefined values and compared to an encoding of an object with those values omitted.

intelliot commented 4 years ago

I think I'm ok with putting this on a patch release (i.e version 1.0.1)