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 simulator overlapping #1137

Merged
merged 69 commits into from
Apr 15, 2024
Merged

Add simulator overlapping #1137

merged 69 commits into from
Apr 15, 2024

Conversation

pingustar
Copy link
Collaborator

@pingustar pingustar commented Mar 25, 2024

This PR fixes:

#957 PR: #1164
#1124 PR: #1160

and overlapping simulator feature

Copy link

cloudflare-pages bot commented Mar 25, 2024

Deploying carbon-app with  Cloudflare Pages  Cloudflare Pages

Latest commit: a2e01be
Status: ✅  Deploy successful!
Preview URL: https://cb3a6bb6.carbon-app-csq.pages.dev
Branch Preview URL: https://simulator-overlapping.carbon-app-csq.pages.dev

View logs

@ashachaf
Copy link
Collaborator

ashachaf commented Mar 25, 2024

  • first visit - missing spread
    on first visit, the spread shows NaN and the chart is missing the selected area
image

@pingustar pingustar marked this pull request as draft March 26, 2024 11:13
@ashachaf
Copy link
Collaborator

ashachaf commented Mar 27, 2024

  • update budget information message text

  • Sell budget message:
    The first price in the selected time frame is outside the ranges you've set for selling {Base}. Therefore, budget for buying {Base} is not required. Learn More

  • Buy budget message:
    The first price in the selected time frame is outside the ranges you've set for buying {Base}. Therefore, budget for selling {Base} is not required. Learn More

  • price diff from market price indication
    currently, there is an indication of diff from market price below the min and max price inputs.
    please remove this indication on the simulation page.

  • sell budget always on top

  • create strategy cta
    currently: opens the first page of the create strategy flow
    updated: expected to open the 2nd page and pre-fill the price and spread fields according to user inputs

# Conflicts:
#	e2e/screenshots/simulator/recurring/Recurring limit limit/form.jpg
#	e2e/screenshots/simulator/recurring/Recurring limit limit/simulator-input-price.jpg
#	e2e/screenshots/simulator/recurring/Recurring limit limit/simulator-results-animation.jpg
#	e2e/screenshots/simulator/recurring/Recurring limit limit/simulator-results-summary.jpg
#	e2e/screenshots/simulator/recurring/Recurring limit range/form.jpg
#	e2e/screenshots/simulator/recurring/Recurring limit range/simulator-input-price.jpg
#	e2e/screenshots/simulator/recurring/Recurring limit range/simulator-results-animation.jpg
#	e2e/screenshots/simulator/recurring/Recurring limit range/simulator-results-summary.jpg
#	e2e/screenshots/simulator/recurring/Recurring range limit/form.jpg
#	e2e/screenshots/simulator/recurring/Recurring range limit/simulator-input-price.jpg
#	e2e/screenshots/simulator/recurring/Recurring range limit/simulator-results-animation.jpg
#	e2e/screenshots/simulator/recurring/Recurring range limit/simulator-results-summary.jpg
#	e2e/screenshots/simulator/recurring/Recurring range range/form.jpg
#	e2e/screenshots/simulator/recurring/Recurring range range/simulator-input-price.jpg
#	e2e/screenshots/simulator/recurring/Recurring range range/simulator-results-animation.jpg
#	e2e/screenshots/simulator/recurring/Recurring range range/simulator-results-summary.jpg
#	e2e/screenshots/strategy/disposable/Disposable buy limit/create/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable buy limit/create/my-strategy.jpg
#	e2e/screenshots/strategy/disposable/Disposable buy limit/deposit/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable buy limit/editPrices/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable buy limit/withdraw/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable buy range/create/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable buy range/create/my-strategy.jpg
#	e2e/screenshots/strategy/disposable/Disposable buy range/deposit/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable buy range/editPrices/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable buy range/withdraw/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable sell limit/create/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable sell limit/create/my-strategy.jpg
#	e2e/screenshots/strategy/disposable/Disposable sell limit/deposit/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable sell limit/editPrices/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable sell limit/withdraw/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable sell range/create/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable sell range/create/my-strategy.jpg
#	e2e/screenshots/strategy/disposable/Disposable sell range/deposit/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable sell range/editPrices/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable sell range/withdraw/form.jpg
#	e2e/screenshots/strategy/overlapping/Overlapping/create/form.jpg
#	e2e/screenshots/strategy/overlapping/Overlapping/create/my-strategy.jpg
#	e2e/screenshots/strategy/recurring/Recurring limit limit/create/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring limit limit/create/my-strategy.jpg
#	e2e/screenshots/strategy/recurring/Recurring limit limit/deposit/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring limit limit/editPrices/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring limit limit/renew/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring limit limit/withdraw/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring limit range/create/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring limit range/create/my-strategy.jpg
#	e2e/screenshots/strategy/recurring/Recurring limit range/deposit/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring limit range/editPrices/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring limit range/renew/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring limit range/withdraw/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring range limit/create/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring range limit/create/my-strategy.jpg
#	e2e/screenshots/strategy/recurring/Recurring range limit/deposit/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring range limit/editPrices/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring range limit/renew/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring range limit/withdraw/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring range range/create/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring range range/create/my-strategy.jpg
#	e2e/screenshots/strategy/recurring/Recurring range range/deposit/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring range range/editPrices/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring range range/renew/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring range range/withdraw/form.jpg
@Costa769
Copy link
Collaborator

Costa769 commented Apr 10, 2024

  • Update sell budget message(change "buying" to "selling"):
    Currently
    image

Updated text
The first price in the selected time frame is outside the ranges you've set for selling {Base}. Therefore, budget for selling {Base} is not required. Learn More

  • price diff from market price indication
    The indication was removed from the overlapping strategy simulation page but is still shown on the recurring strategy simulation page
    please remove this indication from the recurring strategy simulation page.

  • create, withdraw and deposit overlapping page - update budget main and sub titles

Withdraw:
image

Current main title: "Withdraw Budget"
Updated: "Withdraw Budgets"
Current sell subtitle: "Withdraw Sell Budget"
Updated: "Sell Budget"
Current buy subtitle: "Withdraw Buy Budget"
Updated: "Buy Budget"

Deposit:
Same as on withdraw, update main title from "Deposit Budget" to "Deposit Budgets"
and subtitles from "Set Sell Budget" and "Set Buy Budget" to "Sell Budget" and "Buy Budget" accordingly

Create strategy/simulation
Same as above, update subtitles to "Sell Budget" and "Buy Budget" accordingly

…r/overlapping

# Conflicts:
#	e2e/screenshots/simulator/recurring/Recurring limit limit/form.jpg
#	e2e/screenshots/simulator/recurring/Recurring limit limit/simulator-results-summary.jpg
#	e2e/screenshots/simulator/recurring/Recurring limit range/form.jpg
#	e2e/screenshots/simulator/recurring/Recurring range limit/form.jpg
#	e2e/screenshots/simulator/recurring/Recurring range range/form.jpg
#	e2e/screenshots/simulator/recurring/Recurring range range/simulator-input-price.jpg
#	e2e/screenshots/simulator/recurring/Recurring range range/simulator-results-animation.jpg
#	e2e/screenshots/strategy/disposable/Disposable buy limit/create/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable buy limit/deposit/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable buy limit/editPrices/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable buy limit/withdraw/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable buy range/create/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable buy range/deposit/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable buy range/editPrices/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable buy range/withdraw/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable sell limit/create/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable sell limit/editPrices/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable sell limit/withdraw/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable sell range/create/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable sell range/deposit/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable sell range/editPrices/form.jpg
#	e2e/screenshots/strategy/disposable/Disposable sell range/withdraw/form.jpg
#	e2e/screenshots/strategy/overlapping/Overlapping/create/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring limit limit/create/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring limit limit/editPrices/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring limit limit/renew/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring limit range/create/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring limit range/deposit/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring limit range/editPrices/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring limit range/renew/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring limit range/withdraw/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring range limit/create/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring range limit/editPrices/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring range limit/renew/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring range limit/withdraw/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring range range/create/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring range range/deposit/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring range range/editPrices/form.jpg
#	e2e/screenshots/strategy/recurring/Recurring range range/withdraw/form.jpg
src/libs/queries/extApi/simulator.ts Show resolved Hide resolved
src/libs/routing/router.tsx Outdated Show resolved Hide resolved
src/libs/routing/routes/sim.tsx Show resolved Hide resolved
src/components/strategies/common/BudgetInput.tsx Outdated Show resolved Hide resolved
src/components/strategies/common/BudgetInput.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@tiagofilipenunes tiagofilipenunes left a comment

Choose a reason for hiding this comment

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

Great work!!!

Observed while reviewing (feel free to ignore):

  • Because the result page is not keeping track of overlapping buy and sell budgets:
    • When simulating an overlapping strategy and going back, the buy and sell budgets are cleared in the simulator input page
    • Creating a strategy from the overlapping simulator doesn't populate budgets
  • Swapping tokens in simulator overlapping input clears the buy/sell budget
  • Cannot change simulation dates in overlapping results page, but can change them in the input. While I understand this is a deliberate choice, it is possible to set dates in the simulation input which makes the behaviour a bit inconsistent. An issue to enable the calendar for simulator result page in a separate PR could be created

Bug:

  • After swapping to overlapping from recurring, then changing token, the prices shows N/A
    1. Go to simulator input recurring, pick something like ETH/USDT
    2. Change to overlapping, the token choice stayed
    3. Change the quote token and the price chart shows N/A

src/assets/icons/action.svg Outdated Show resolved Hide resolved
src/libs/routing/router.tsx Outdated Show resolved Hide resolved
src/pages/simulator/result/index.tsx Outdated Show resolved Hide resolved
src/pages/simulator/result/index.tsx Outdated Show resolved Hide resolved
src/pages/simulator/recurring/index.tsx Outdated Show resolved Hide resolved
src/libs/modals/modals/ModalWithdrawOrDelete.tsx Outdated Show resolved Hide resolved
src/pages/simulator/overlapping/index.tsx Outdated Show resolved Hide resolved
pingustar and others added 7 commits April 15, 2024 13:37
Co-authored-by: Tiago <66181828+tiagofilipenunes@users.noreply.github.com>
Co-authored-by: Tiago <66181828+tiagofilipenunes@users.noreply.github.com>
Co-authored-by: Tiago <66181828+tiagofilipenunes@users.noreply.github.com>
pingustar and others added 2 commits April 15, 2024 13:38
…r/overlapping

# Conflicts:
#	e2e/screenshots/simulator/recurring/Recurring limit range/simulator-input-price.jpg
#	e2e/screenshots/simulator/recurring/Recurring range limit/simulator-input-price.jpg
#	e2e/screenshots/strategy/disposable/Disposable sell limit/deposit/form.jpg
Copy link
Collaborator

@GrandSchtroumpf GrandSchtroumpf left a comment

Choose a reason for hiding this comment

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

Great work !

@pingustar pingustar merged commit b77bc7d into main Apr 15, 2024
1 check passed
@pingustar pingustar deleted the simulator/overlapping branch April 15, 2024 14:07
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.

None yet

5 participants