rishflab
744968a630
Limit quantity to increments of 100
Bitmex only allows buy/sell orders in increments of 100 USD. In order to
simplify the hedging calculation for the maker we keep quantity the same
as Bitmex.
3 years ago
dependabot[bot]
91dee983ab
Bump @types/node from 16.11.10 to 16.11.11 in /taker-frontend
Bumps [@types/node ](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node ) from 16.11.10 to 16.11.11.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases )
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node )
---
updated-dependencies:
- dependency-name: "@types/node"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Daniel Karzel
cbc42b6e5f
Fix the balance-too-low check for the Long button disable
- Pass in the balance
- The condition using `&&` did not evaluate correctly when the balance is `0` (because of how integers are evaluated in a boolean expression). The wallet balance in the `Trade` component is always a number (if we don't know a balance set it to 0...) which simplifies the logic.
Tested the behaviour in the UI with different balances (0, < margin, > margin) and it behaves as expected.
3 years ago
rishflab
f2e9f527f8
Non-collaboratively close if maker is offline
Previously the taker UI would attempt to collaboratively close which
does not work if the maker is offline.
Create CloseButton component that can be configured to
non-collaboratively or collaboratively close.
3 years ago
dependabot[bot]
66e93addb4
Bump @emotion/react from 11.6.0 to 11.7.0 in /taker-frontend
Bumps [@emotion/react ](https://github.com/emotion-js/emotion ) from 11.6.0 to 11.7.0.
- [Release notes](https://github.com/emotion-js/emotion/releases )
- [Changelog](https://github.com/emotion-js/emotion/blob/main/CHANGELOG.md )
- [Commits](https://github.com/emotion-js/emotion/compare/@emotion/react@11.6.0...@emotion/react@11.7.0 )
---
updated-dependencies:
- dependency-name: "@emotion/react"
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Thomas Eizinger
ec712b33ae
Replace formatting of quantity with input addon
3 years ago
Thomas Eizinger
b840bdee89
Debounce margin calculation
We wait for at least 500ms before actually calculating the margin.
This avoids unnecessary API requests when the user rapidly edits
the input field.
3 years ago
Thomas Eizinger
c7e91b4eea
Half the number of `calculate` requests
We already have a `useEffect` that re-calculates the margin, no need
to do it again the onChange handler.
3 years ago
Thomas Eizinger
7ec7188528
Remove unnecessary `toString`ing
We no longer need this.
3 years ago
Thomas Eizinger
024ded6eb4
Don't parse margin if we have it as a number already
3 years ago
Thomas Eizinger
90b8b5d684
Delay formatting of margin as long as possible
3 years ago
Thomas Eizinger
c050d5956f
Store margin as number
We are parsing this as a number a million times inside `Trade`.
Storing it as a number is a first step in fixing this.
3 years ago
Thomas Eizinger
e7ec622672
Margin is not actually optional
The type definition was wrong. Margin is actually always set.
3 years ago
Thomas Eizinger
1fed25ea83
Rewrite Trade as `function` component
This allows us to co-locate the `default` export with the component
definition.
3 years ago
dependabot[bot]
ce54b21dd8
Bump framer-motion from 5.3.2 to 5.3.3 in /taker-frontend
Bumps [framer-motion](https://github.com/framer/motion ) from 5.3.2 to 5.3.3.
- [Release notes](https://github.com/framer/motion/releases )
- [Changelog](https://github.com/framer/motion/blob/main/CHANGELOG.md )
- [Commits](https://github.com/framer/motion/compare/v5.3.2...v5.3.3 )
---
updated-dependencies:
- dependency-name: framer-motion
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Thomas Eizinger
efecc2eead
Make it clear what the payout is
Fixes #557 .
3 years ago
Thomas Eizinger
425fff8303
Remove pointless attribute
The table doesn't have a visible border, no need to set rounding.
3 years ago
Thomas Eizinger
9d5a9dfcad
Remove unused settings navigation item
3 years ago
dependabot[bot]
106869a4be
Bump @types/react from 17.0.36 to 17.0.37 in /taker-frontend
Bumps [@types/react ](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react ) from 17.0.36 to 17.0.37.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases )
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react )
---
updated-dependencies:
- dependency-name: "@types/react"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
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
dependabot[bot]
b248fa760c
Bump framer-motion from 5.3.1 to 5.3.2 in /taker-frontend
Bumps [framer-motion](https://github.com/framer/motion ) from 5.3.1 to 5.3.2.
- [Release notes](https://github.com/framer/motion/releases )
- [Changelog](https://github.com/framer/motion/blob/main/CHANGELOG.md )
- [Commits](https://github.com/framer/motion/compare/v5.3.1...v5.3.2 )
---
updated-dependencies:
- dependency-name: framer-motion
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
c749fb8626
Bump @types/node from 16.11.9 to 16.11.10 in /taker-frontend
Bumps [@types/node ](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node ) from 16.11.9 to 16.11.10.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases )
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node )
---
updated-dependencies:
- dependency-name: "@types/node"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
749b1db7c7
Bump @testing-library/jest-dom from 5.15.0 to 5.15.1 in /taker-frontend
Bumps [@testing-library/jest-dom ](https://github.com/testing-library/jest-dom ) from 5.15.0 to 5.15.1.
- [Release notes](https://github.com/testing-library/jest-dom/releases )
- [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md )
- [Commits](https://github.com/testing-library/jest-dom/compare/v5.15.0...v5.15.1 )
---
updated-dependencies:
- dependency-name: "@testing-library/jest-dom"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
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]
c2f61ef79b
Bump @vitejs/plugin-react from 1.0.9 to 1.1.0 in /taker-frontend
Bumps [@vitejs/plugin-react ](https://github.com/vitejs/vite/tree/HEAD/packages/plugin-react ) from 1.0.9 to 1.1.0.
- [Release notes](https://github.com/vitejs/vite/releases )
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/plugin-react/CHANGELOG.md )
- [Commits](https://github.com/vitejs/vite/commits/create-app@1.1.0/packages/plugin-react )
---
updated-dependencies:
- dependency-name: "@vitejs/plugin-react"
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
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
dependabot[bot]
76207a831f
Bump framer-motion from 4.1.17 to 5.3.1 in /taker-frontend
Bumps [framer-motion](https://github.com/framer/motion ) from 4.1.17 to 5.3.1.
- [Release notes](https://github.com/framer/motion/releases )
- [Changelog](https://github.com/framer/motion/blob/main/CHANGELOG.md )
- [Commits](https://github.com/framer/motion/compare/v4.1.17...v5.3.1 )
---
updated-dependencies:
- dependency-name: framer-motion
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
2aa2cb0d36
Bump @chakra-ui/react from 1.6.12 to 1.7.2 in /taker-frontend
Unfortunately, we have to install `next` to make @chakra-ui/react 1.7.2
work. For more details, see the linked issue.
https://github.com/chakra-ui/chakra-ui/issues/5082 .
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
dependabot[bot]
c1b5f8a663
Bump @types/react from 17.0.35 to 17.0.36 in /taker-frontend
Bumps [@types/react ](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react ) from 17.0.35 to 17.0.36.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases )
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react )
---
updated-dependencies:
- dependency-name: "@types/react"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
bonomat
f9c6d8d1a2
Use according to show/hide closed positions
when having many, they clutter the screen
3 years ago
dependabot[bot]
b6e2f4d11c
Bump @types/eslint from 7.29.0 to 8.2.0 in /taker-frontend
Bumps [@types/eslint ](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/eslint ) from 7.29.0 to 8.2.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases )
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/eslint )
---
updated-dependencies:
- dependency-name: "@types/eslint"
dependency-type: direct:development
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
f8d90181de
Bump react-refresh from 0.10.0 to 0.11.0 in /taker-frontend
Bumps [react-refresh](https://github.com/facebook/react/tree/HEAD/packages/react ) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/facebook/react/releases )
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md )
- [Commits](https://github.com/facebook/react/commits/v0.11.0/packages/react )
---
updated-dependencies:
- dependency-name: react-refresh
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
3d53921445
Bump @types/node from 16.11.7 to 16.11.9 in /taker-frontend
Bumps [@types/node ](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node ) from 16.11.7 to 16.11.9.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases )
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node )
---
updated-dependencies:
- dependency-name: "@types/node"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
435e20fed3
Bump @types/jest from 27.0.2 to 27.0.3 in /taker-frontend
Bumps [@types/jest ](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest ) from 27.0.2 to 27.0.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases )
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest )
---
updated-dependencies:
- dependency-name: "@types/jest"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
0d51fe71e4
Bump @testing-library/react from 10.4.9 to 12.1.2 in /taker-frontend
Bumps [@testing-library/react ](https://github.com/testing-library/react-testing-library ) from 10.4.9 to 12.1.2.
- [Release notes](https://github.com/testing-library/react-testing-library/releases )
- [Changelog](https://github.com/testing-library/react-testing-library/blob/main/CHANGELOG.md )
- [Commits](https://github.com/testing-library/react-testing-library/compare/v10.4.9...v12.1.2 )
---
updated-dependencies:
- dependency-name: "@testing-library/react"
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
c0cfc39981
Bump @vitejs/plugin-react from 1.0.7 to 1.0.9 in /taker-frontend
Bumps [@vitejs/plugin-react ](https://github.com/vitejs/vite/tree/HEAD/packages/plugin-react ) from 1.0.7 to 1.0.9.
- [Release notes](https://github.com/vitejs/vite/releases )
- [Changelog](https://github.com/vitejs/vite/blob/plugin-react@1.0.9/packages/plugin-react/CHANGELOG.md )
- [Commits](https://github.com/vitejs/vite/commits/plugin-react@1.0.9/packages/plugin-react )
---
updated-dependencies:
- dependency-name: "@vitejs/plugin-react"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
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
dependabot[bot]
70e993b4c6
Bump typescript from 4.4.4 to 4.5.2 in /taker-frontend
Bumps [typescript](https://github.com/Microsoft/TypeScript ) from 4.4.4 to 4.5.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases )
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.4.4...v4.5.2 )
---
updated-dependencies:
- dependency-name: typescript
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
72711f0d39
Bump vite from 2.6.13 to 2.6.14 in /taker-frontend
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite ) from 2.6.13 to 2.6.14.
- [Release notes](https://github.com/vitejs/vite/releases )
- [Changelog](https://github.com/vitejs/vite/blob/v2.6.14/packages/vite/CHANGELOG.md )
- [Commits](https://github.com/vitejs/vite/commits/v2.6.14/packages/vite )
---
updated-dependencies:
- dependency-name: vite
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago