Issue type
Brief description
The Order model comes with 2 object keys, types and statuses built here: https://github.com/bitfinexcom/bfx-api-node-models/blob/master/lib/order.js#L728
Spaces are converted to underscores as convenience for the keys, but the original value is also saved as a key, and both copies point to the value. i.e. we have this:
Order.type.EXCHANGE_LIMIT = 'EXCHANGE LIMIT'
Order.type['EXCHANGE LIMIT'] = 'EXCHANGE LIMIT'
This needs to be refactored to only provide valid types (no underscores); it was done like this for ease of use but the duplicate keys make iteration difficult/filtering necessary in some places. Also becomes confusing seeing underscores in some places and spaces in others.
Issue type
Brief description
The
Ordermodel comes with 2 object keys,typesandstatusesbuilt here: https://github.com/bitfinexcom/bfx-api-node-models/blob/master/lib/order.js#L728Spaces are converted to underscores as convenience for the keys, but the original value is also saved as a key, and both copies point to the value. i.e. we have this:
This needs to be refactored to only provide valid types (no underscores); it was done like this for ease of use but the duplicate keys make iteration difficult/filtering necessary in some places. Also becomes confusing seeing underscores in some places and spaces in others.