Thomas Eizinger
32b3031455
Re-organize frontend modules
1. "Components" refers to React components. "Types" and "HttpError"
are not React components and should thus be moved out.
2. Only components use JSX syntax, other files can/should have a regular
.ts extension.
3. If a file only exports one thing, make it a default export.
3 years ago
Thomas Eizinger
622a8ea696
Refactor multiple uses of `useAsync` into a single `usePostRequest` hook
3 years ago
Thomas Eizinger
cdf5610ccd
Remove unnecessary `useAsync` layer
We can make further modifications of the body in the event handler,
no need for doing another `useAsync`.
3 years ago
Thomas Eizinger
52f5106053
Rename `Hooks.tsx` file to what it contains
1. This does not contain JSX syntax so no need for ts_x_.
2. It default-exports a function, implying that we are not going
to export anything else, thus we can rename it to the hook that we
are exporting.
3 years ago
Mariusz Klochowicz
cd3335e20f
Display maker status in the NavBar and an alert if maker is offline
Warn the users that some functionality might be unavailable if there is no maker
online.
Co-authored-by: rishflab <rishflab@hotmail.com>
3 years ago
bonomat
cebe3c0336
Use form and form submit for better handling
3 years ago
bonomat
c951fe6f57
Add new endpoint to allow withdrawing through UI
3 years ago
scratchy
d49e2efa83
Should not be able to trigger close in `PendingOpen`
Triggering a settlement proposal prior to being `Open` does not make sense.
3 years ago
bonomat
55dd2fa7d9
Throw HTTP Error so that `userErrorToast` works
3 years ago
bonomat
090214fd49
Move wallet info out of navbar into main screen
resolves #519
resolves #536
3 years ago
dependabot[bot]
af529267e7
Bump react-router-dom from 5.3.0 to 6.0.2 in /taker-frontend
This patch also fixes a bug where we redirect to `/trade` instead
of `/` which now renders an empty page with the new router.
3 years ago
bonomat
e2d174f262
Add warnings if input quantity is not valid
3 years ago
bonomat
ed14856da3
Rename some vars
3 years ago
bonomat
1471d0fa21
Disable to go-long button if
- balance < required margin
- entered quantity > max_quantity or < min_quantity
- entered quantity <= 0
3 years ago
bonomat
f9c6d8d1a2
Use according to show/hide closed positions
when having many, they clutter the screen
3 years ago
Mariusz Klochowicz
c01dfdd47f
Add a footer with social media links
Add Telegram, Twitter and GitHub links to ItchySats.
The footer is styled in the similar way to the header and follows the theme changes.
3 years ago
Mariusz Klochowicz
ef27eff999
Improve user-facing string if taker daemon shuts down
Make the error toast suggest the next reasonable action in case of such event.
3 years ago
Mariusz Klochowicz
6ddb4d723a
Utilise HttpProblemApi responses in taker frontend
Toasts now display more meaningful information about the error.
3 years ago
Mariusz Klochowicz
ab5ee77842
Monitor for taker's backend presence in the UI
It's important to have this in the meantime, otherwise taker will get shutdown
when maker goes offline and we will not notice it.
3 years ago
bonomat
f0a7dd0640
Remove liquidation price from main screen.
The current shown liquidation price only makes sense if the trader goes long. If she were to go short, the liquidation price should be different. With the current setup we can't know whether the trader wants to go long or short, hence we can't show the correct liquidation price
3 years ago
Mariusz Klochowicz
121dda58b8
Disable taker's "go long" button under the same conditions as older UI
Disable the button when there's no order or there's an in-flight order request
already.
3 years ago
Thomas Eizinger
7689f7db70
Disable slider instead of read-only
Disabled UI elements make it clear to the user that they cannot
change them.
3 years ago
Thomas Eizinger
9da18368ed
Fix typo in buy prompt
3 years ago
itchymax
36d29cc881
Use BXBT index for main price
3 years ago
bonomat
dd14cc9859
Remove checkbox from confirmation buy confirmation dialog
3 years ago
bonomat
0b495c7f6e
Remove checkbox from close position dialog
3 years ago
itchymax
f39f206ce8
Fix route paths.
The default route / has to come last
3 years ago
itchymax
088bf45112
Add new taker-frontend and rename old to maker-frontend
3 years ago