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

exchange order history shows wrong data on OrderFill events #674

Open
treerz opened this issue Jun 11, 2019 · 0 comments
Open

exchange order history shows wrong data on OrderFill events #674

treerz opened this issue Jun 11, 2019 · 0 comments
Labels

Comments

@treerz
Copy link
Contributor

treerz commented Jun 11, 2019

in modules/ethereum/tradeTransactions.js
formatTradeEvent() method
the conditions for orderId and direction are completely wrong:

  • event.name does not exist: event.name should be event.event, that is what contains e.g. "OrderFill"
  • the condition using weiAmount is nonsense in case of OrderFill: weiAmount is never zero (for OrderFill events), which means for both direction and id columns we choose "buy", regardless of the actual direction
  • e.orderId does not exist for OrderFill events, which leaves only the wrong weiAmount check
  • the type parameter of the method is correct in case of OrderFill-s (it is either "buy or "sell"), it is recommended to use that for both conditions in case of OrderFill events: if event.event is "OrderFill", then direction should be exactly what type is, and orderId should be either e.buyTokenOrderId or e.sellTokenOrderId according to type.

Note: these codes have been significantly changed since the last deploy, so the current staging and master versions are different (both are wrong, but in a different way). Above comments refer to current staging version (bafd0c3).

@treerz treerz added the bug label Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant