squeeth-monorepo
squeeth-monorepo copied to clipboard
Feat/short long warnings
Task: Allow users to go short even if they have some long position and vice versa by changing hard block into overrideable warning
Description
Currently we only allow users to go short if they have closed out their full long and vice versa. However, many advanced users (especially ones that LP) can be long and short at the same time or have just amounts of either. Instead of hard blocking this scenario, we can have a warning that warns users they are going long while they still have a short or vice versa, which serves the purpose of preventing most people from taking that action, but doesn't frustrate or block advanced users who want access to that flow.
Opening & closing a long while have a short position:
https://user-images.githubusercontent.com/13340486/172070046-6b6c740f-e8d9-429c-bf41-13c7b6c70869.mov
Opening & closing a short while have a long position:
https://user-images.githubusercontent.com/13340486/172070080-7b4153af-aa89-420e-98a1-38782cfb6c54.mov
Fixes # (issue) #507
Type of change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Document update
How Has This Been Tested
Locally
FE Checklist
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [x] My changes generate no new warnings
- [x] Added video recordings if it is a UI change
User Facing Checklist
- [x] I fully understand the user problem this PR is solving
- [x] I know who the target user is for this PR and have a deep understanding of that user
- [x] I have tried this flow thinking from the pov of the target user for this PR
- [ ] I (or working w someone on team) have scheduled a user test for this PR (if it is a large change)
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
continuouscall | ✅ Ready (Inspect) | Visit Preview | Jun 6, 2022 at 6:09AM (UTC) |