Thomas Eizinger
71c06668c2
Introduce event-sourcing
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
Co-authored-by: Daniel Karzel <daniel@comit.network>
3 years ago
dependabot[bot]
c41dd220d3
Bump eslint from 8.4.1 to 8.5.0 in /taker-frontend
Bumps [eslint](https://github.com/eslint/eslint ) from 8.4.1 to 8.5.0.
- [Release notes](https://github.com/eslint/eslint/releases )
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md )
- [Commits](https://github.com/eslint/eslint/compare/v8.4.1...v8.5.0 )
---
updated-dependencies:
- dependency-name: eslint
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
9ecf39e596
Bump @types/node from 17.0.0 to 17.0.1 in /taker-frontend
Bumps [@types/node ](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node ) from 17.0.0 to 17.0.1.
- [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]
2799b4a118
Bump vite from 2.7.3 to 2.7.4 in /taker-frontend
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite ) from 2.7.3 to 2.7.4.
- [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.4/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
dependabot[bot]
b0b2d87c41
Bump react-router-dom from 6.1.1 to 6.2.1 in /taker-frontend
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom ) from 6.1.1 to 6.2.1.
- [Release notes](https://github.com/remix-run/react-router/releases )
- [Commits](https://github.com/remix-run/react-router/commits/v6.2.1/packages/react-router-dom )
---
updated-dependencies:
- dependency-name: react-router-dom
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
1e96cc99ef
Bump vite from 2.7.2 to 2.7.3 in /taker-frontend
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite ) from 2.7.2 to 2.7.3.
- [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.3/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
dependabot[bot]
ae64422574
Bump framer-motion from 5.5.1 to 5.5.5 in /taker-frontend
Bumps [framer-motion](https://github.com/framer/motion ) from 5.5.1 to 5.5.5.
- [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.5.1...v5.5.5 )
---
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]
eb600e5c71
Bump @types/node from 16.11.12 to 17.0.0 in /taker-frontend
Bumps [@types/node ](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node ) from 16.11.12 to 17.0.0.
- [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-major
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Thomas Eizinger
3b9faa6f6b
Add linter to avoid future usage of devDependencies
3 years ago
Thomas Eizinger
35b929f361
Move all dependencies to `dependencies`
When using a bundler, there is no need for npm's differentation
between dependencies and devDependencies and it only leads to
confusion which ones are already installed.
3 years ago
Thomas Eizinger
7ac8de471e
Remove duplicate dependency declarations
These are already present in the `dependencies` section.
3 years ago
Thomas Eizinger
c55f579574
Remove react-scripts dependency
We are using vite as our build tool. No need for react-scripts.
The removal of react-scripts highlights that we are depending
on things like eslint without declaring these dependencies. Fix
that.
3 years ago
dependabot[bot]
bf28cf7c76
Bump framer-motion from 5.4.5 to 5.5.1 in /taker-frontend
Bumps [framer-motion](https://github.com/framer/motion ) from 5.4.5 to 5.5.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/v5.4.5...v5.5.1 )
---
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
dependabot[bot]
797381bd81
Bump vite from 2.7.1 to 2.7.2 in /taker-frontend
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite ) from 2.7.1 to 2.7.2.
- [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/create-vite@2.7.2/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
dependabot[bot]
974f6deec0
Bump @vitejs/plugin-react from 1.1.1 to 1.1.3 in /taker-frontend
Bumps [@vitejs/plugin-react ](https://github.com/vitejs/vite/tree/HEAD/packages/plugin-react ) from 1.1.1 to 1.1.3.
- [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.3/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]
7e788f7a01
Bump typescript from 4.5.3 to 4.5.4 in /taker-frontend
Bumps [typescript](https://github.com/Microsoft/TypeScript ) from 4.5.3 to 4.5.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases )
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.5.3...v4.5.4 )
---
updated-dependencies:
- dependency-name: typescript
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
b1927f5f22
Bump @emotion/react from 11.7.0 to 11.7.1 in /taker-frontend
Bumps [@emotion/react ](https://github.com/emotion-js/emotion ) from 11.7.0 to 11.7.1.
- [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.7.0...@emotion/react@11.7.1 )
---
updated-dependencies:
- dependency-name: "@emotion/react"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
053606f46d
Bump react-router-dom from 6.0.2 to 6.1.1 in /taker-frontend
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom ) from 6.0.2 to 6.1.1.
- [Release notes](https://github.com/remix-run/react-router/releases )
- [Commits](https://github.com/remix-run/react-router/commits/v6.1.1/packages/react-router-dom )
---
updated-dependencies:
- dependency-name: react-router-dom
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Daniel Karzel
c6f13195b1
Remove oracle event id from cfd
Loading the CFD by oracle event id, based on the "initial oracle event id" that we store in the CFD is wrong.
We should actually no store this even id at all, as it only becomes relevant once the setup is completed and we have a DLC.
If we load based on the event id that was stored in the CFD we might still load based on an outdated id once we roll over!
Thus, the event id of the cfd was removed. We always use the one stored in the DLC.
Since it is very hard to load a CFD based on the event id in the DLC (because that only exists in some states) this was removed.
Instead, upon attestation, we load all CFDs and then decide if we care about the attestation.
This should be optimized to loading all **open** CFDs at some point.
3 years ago
dependabot[bot]
91e6989848
Bump framer-motion from 5.4.4 to 5.4.5 in /taker-frontend
Bumps [framer-motion](https://github.com/framer/motion ) from 5.4.4 to 5.4.5.
- [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.4...v5.4.5 )
---
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]
2f345334ec
Bump @chakra-ui/react from 1.7.2 to 1.7.3 in /taker-frontend
Bumps [@chakra-ui/react ](https://github.com/chakra-ui/chakra-ui/tree/HEAD/packages/react ) from 1.7.2 to 1.7.3.
- [Release notes](https://github.com/chakra-ui/chakra-ui/releases )
- [Changelog](https://github.com/chakra-ui/chakra-ui/blob/main/packages/react/CHANGELOG.md )
- [Commits](https://github.com/chakra-ui/chakra-ui/commits/@chakra-ui/menu@1.7.3/packages/react )
---
updated-dependencies:
- dependency-name: "@chakra-ui/react"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
dependabot[bot]
343d27ee36
Bump typescript from 4.5.2 to 4.5.3 in /taker-frontend
Bumps [typescript](https://github.com/Microsoft/TypeScript ) from 4.5.2 to 4.5.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases )
- [Commits](https://github.com/Microsoft/TypeScript/commits )
---
updated-dependencies:
- dependency-name: typescript
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
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