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

Add Maker mode, and order form options for GoodTillCancelled / FillOrKill #2424

Merged
merged 14 commits into from Apr 8, 2024

Conversation

smk762
Copy link
Collaborator

@smk762 smk762 commented Apr 4, 2024

Closes #956

This PR also includes some changes to the dex pro view layout. All trading operations on both Simple and Pro view should be thoroughly tested for regression.

gtc.mp4

Beyond the layout changes, this PR introduces a checkbox in the Confirm Exchange Details modal
image

This checkbox is on by default, which is effectively the same as before: When you create an order, if it does not match within 30 seconds, it becomes a maker order and stays on the orderbook.

If the checkbox is unticked, the order id place with the FillOrKill order_type parameter.

This means that if an order is placed which is not matched with an existing order on the orderbook, it will automatically cancel after 30 seconds.

To Test (pro view):

  • Place orders which will not be matched:
    • in sell mode, with good until cancelled checkbox ticked on. It should remain on the orderbook after trying and failing to match.
    • in sell mode, with good until cancelled checkbox ticked off. It should not enter the orderbook after trying and failing to match.
    • in buy mode, with good until cancelled checkbox ticked on. It should remain on the orderbook after trying and failing to match.
    • in buy mode, with good until cancelled checkbox ticked off. It should not enter the orderbook after trying and failing to match.

To Test (general):

  • Attempt some orders in simple view to confirm no regression.
  • Navigate around the new pro view layout to confirm all components still function as expected.

PART 2 BELOW

@smk762 smk762 changed the title Add order form option for GoodTillCancelled / FillOrKill Add Maker mode, and order form options for GoodTillCancelled / FillOrKill Apr 4, 2024
@smk762
Copy link
Collaborator Author

smk762 commented Apr 4, 2024

Closes #956 (the rest)
Added Maker tab for order form to allow users to place maker (setprice) orders.

makertaker.mp4
  • Maker tab is always sell, so buy/sell selectors are not included.
  • While in maker mode, the orderbook deactivates, Maker creates order, not selects one.
  • While in maker mode, bestorders is still active as it allows a shortcut to change pair to a more/less competitive market. Selecting a line on bestorders changes the maker target coin (to buy) to the selected coin.

To test:

  • place an order in maker mode which is too high to match (eg. 10 DOC for 1 MARTY). It should enter your "Orders" tab as a maker order immediately instead of waiting to match first.
  • when confirming maker orders, there is a checkbox to cancel existing orders of the same pair. Create a few maker orders of the same pair without cancelling, then confirm by creating one with cancel to see all existing of the same pair are cancelled (the one you just created will remain).
  • General navigation and click probing to identify any regression.
cancelmaker.mp4

Copy link
Collaborator

@AndrewDelaney AndrewDelaney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionally everything checks out. However there is a UI issue on the Exchange Confirmation dialogue:

image

As seen in the image above, the "Cancel" and "Confirm" buttons overflow off the modal.
This is likely not necessarily an introduced issue. Although this is not seen on the previous versions, I believe the addition of the new checkbox pushes the buttons to the point where it shows.

@smk762
Copy link
Collaborator Author

smk762 commented Apr 6, 2024

Thanks! Should be fixed now, I've moved the warnings into the scrollable area
image

Copy link
Collaborator

@AndrewDelaney AndrewDelaney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing was successful, everything is working and looks good now.
The following items were tested:

  • Sell Mode [Good until cancelled] checkbox is checked. Order remains in the Order Book
  • Sell Mode [Good until cancelled] checkbox is not checked. Order does not remain in the Order Book after failing to match.
  • Buy Mode [Good until cancelled] checkbox is checked. Order remains in the Order Book
  • Buy Mode [Good until cancelled] checkbox is not checked. Order does not remain in the Order Book after failing to match.
  • Place multiple orders in maker mode that are too high to match [Cancel Existing Orders] checkbox is not checked. Orders remain in order book
  • Place an order in maker mode after the previous step with [Cancel Existing Orders] checkbox checked. All previous orders of the same type are cancelled, leaving only the current created order
  • General UI testing throughout the module
  • Functional testing of module features

@smk762 smk762 merged commit 3f25b37 into dev Apr 8, 2024
6 checks passed
@smk762 smk762 deleted the add/order-options branch April 8, 2024 16:48
@TheComputerGenie
Copy link

How does one get something that looks like what you're showing rather than this:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE REQUEST]: Add "FillOrKill" or "GoodUntilCancelled" options when placing order
3 participants