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

Deployment debug tab on add order #887

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

findolor
Copy link
Collaborator

Closes #867

Motivation

See issue: #867

Solution

  • Decoupled the debug logic from run scenario button. It now fetches the correct data after each keystroke using a debounced function
  • Added a visual component similar to order quotes
Screenshot 2024-09-25 at 11 46 18 Screenshot 2024-09-25 at 11 48 05

Checks

By submitting this for review, I'm confirming I've done the following:

  • made this PR as small as possible
  • unit-tested any new functionality
  • linked any relevant issues or PRs

@findolor findolor self-assigned this Sep 25, 2024
@hardyjosh
Copy link
Contributor

hardyjosh commented Sep 25, 2024

So @findolor this looks great on the happy path but i found a couple of issues:

  1. Simple one - if there's only one thing on the calculate-io stack, the component breaks. I assume because it's looking for [0] and [1] and only [0] is there. If this is the case it should just say there isn't enough on the stack to get both a max amount and ratio.
  2. Another simple one - if ratio is 0 i get this error
image
  1. For these tokens I'm getting "UNKNOWN/UNKNOWN" as both pairs?
tokens:
  polygon-usdt:
    network: polygon
    address: 0xc2132D05D31c914a87C6611C10748AEb04B58e8F
    decimals: 6
  polygon-ioen:
    network: polygon
    address: 0xd0e9c8f5fae381459cf07ec506c1d2896e8b5df6
    decimals: 18

orders:
  polygon:
    orderbook: polygon
    inputs:
      - token: polygon-ioen
      - token: polygon-usdt
    outputs:
      - token: polygon-ioen
      - token: polygon-usdt
  1. If there's any error at all with the rainlang or yaml the spinner spins indefinitely and no error is shown. We need to show the error, here's a super rough example
image

Buuuut, only some pairs may have an error. For example this one should only show an error for one of the pairs, but an error for any pair means the whole call fails. The other thing is we need to show partial traces, so if there is an error we still need the trace up until the error, as we do with quotes.
image

@hardyjosh
Copy link
Contributor

hardyjosh commented Oct 1, 2024

If I have a really long value (in this case it'smax-value()), then the hex version gets pushed off the side and i can't scroll.

might need an overflow-x-scroll wrapper on the table.

image

@hardyjosh
Copy link
Contributor

something is weird where the older error isn't being removed when new information comes through

image

@hardyjosh
Copy link
Contributor

still getting UNKNOWN/UNKNOWN for the pairs

image

Copy link
Contributor

@hardyjosh hardyjosh left a comment

Choose a reason for hiding this comment

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

See comments for manual testing feedback

@hardyjosh
Copy link
Contributor

@findolor i wonder if it would be good to use tanstack for this.

at the moment if you go to another tab, then back to the debug tab you have to wait for it to load again, even if you haven't changed any of the text. using tanstack would get us caching so it would load instantly.

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.

Replace the debug panel on add order with something that works just like quotes on the live order pages
2 participants