Skip to content
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

Refactor: Server-Valid Order Types & Status Enums #48

Open
1 of 4 tasks
f3rno opened this issue May 12, 2020 · 0 comments
Open
1 of 4 tasks

Refactor: Server-Valid Order Types & Status Enums #48

f3rno opened this issue May 12, 2020 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@f3rno
Copy link
Contributor

f3rno commented May 12, 2020

Issue type

  • bug
  • missing functionality
  • performance
  • feature request

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.

@f3rno f3rno added enhancement New feature or request good first issue Good for newcomers labels May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant