dependabot[bot]
aada693b06
Bump framer-motion from 5.4.3 to 5.4.4 in /taker-frontend
Bumps [framer-motion](https://github.com/framer/motion ) from 5.4.3 to 5.4.4.
- [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.4.3...v5.4.4 )
---
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]
1e945fa738
Bump vite from 2.6.14 to 2.7.1 in /taker-frontend
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite ) from 2.6.14 to 2.7.1.
- [Release notes](https://github.com/vitejs/vite/releases )
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md )
- [Commits](https://github.com/vitejs/vite/commits/v2.7.1/packages/vite )
---
updated-dependencies:
- dependency-name: vite
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
4ad5a14b56
Bump framer-motion from 5.3.3 to 5.4.3 in /taker-frontend
Bumps [framer-motion](https://github.com/framer/motion ) from 5.3.3 to 5.4.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.3...v5.4.3 )
---
updated-dependencies:
- dependency-name: framer-motion
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Daniel Karzel
95d8b7c9ab
Save counterparty identity for cfds to the database
We need this on the maker side to be able to get stats on what takers do.
For the taker it will also become relevant in the future so it is not wrong to add it.
3 years ago
bonomat
4693ef664c
Change popup text based on how taker wants to close the cfd
3 years ago
Thomas Eizinger
d356f7d1d6
Display Skeleton for P/L and Payout if not available
In case we fail to calculate the profit or this data is otherwise not
available, we still want to display as much as possible and only
blank out the data we cannot compute.
3 years ago
Thomas Eizinger
d2eea0b3a7
Align variable naming
3 years ago
bonomat
9d02502593
Make button size fix
Looks good until a quantity of 100_000_000
3 years ago
bonomat
a3206644ff
Make the number input full width to not weirdly jump
3 years ago
bonomat
dcf57c6b17
By moving the alertbox below the grid the size of the grid is not randomly expanding if the alertbox is shown
3 years ago
bonomat
29017d97f9
Fix reference price being undefined sometimes
3 years ago
dependabot[bot]
473b9d7def
Bump @vitejs/plugin-react from 1.1.0 to 1.1.1 in /taker-frontend
Bumps [@vitejs/plugin-react ](https://github.com/vitejs/vite/tree/HEAD/packages/plugin-react ) from 1.1.0 to 1.1.1.
- [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/plugin-vue@1.1.1/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
dependabot[bot]
9225c4117f
Bump @types/node from 16.11.11 to 16.11.12 in /taker-frontend
Bumps [@types/node ](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node ) from 16.11.11 to 16.11.12.
- [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]
64b231c9f5
Bump @testing-library/jest-dom from 5.15.1 to 5.16.1 in /taker-frontend
Bumps [@testing-library/jest-dom ](https://github.com/testing-library/jest-dom ) from 5.15.1 to 5.16.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.1...v5.16.1 )
---
updated-dependencies:
- dependency-name: "@testing-library/jest-dom"
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Mariusz Klochowicz
070a45f13a
Improve the link display in the disclaimer
Add the link icon with the same colour as other links.
3 years ago
Mariusz Klochowicz
d2200e3702
Improve closing Cfd message in the taker UI
- Present the timestamp in human-readable format instead of Unix time,
- use lowercase action name
3 years ago
dependabot[bot]
5ee94eb103
Bump @types/eslint from 8.2.0 to 8.2.1 in /taker-frontend
Bumps [@types/eslint ](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/eslint ) from 8.2.0 to 8.2.1.
- [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-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Mariusz Klochowicz
e22864ce3e
Add a disclaimer on taker startup
Display a modal pop-up that goes away when it gets acknowledged.
3 years ago
Daniel Karzel
fbdc6c5e77
Hello message
3 years ago
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