Daniel Karzel
a43312de2d
Don't panic in endpoints
Does not tackle fixing previously already existing endpoints.
3 years ago
Daniel Karzel
592e81c897
Re-trigger sending commit in case we start up in `PendingCommit`
For now the behavior is: Once the user pressed the button commit will be published and also retried upon startup.
3 years ago
Daniel Karzel
42b4701bc7
Non-collaborative close by publishing commit tx
3 years ago
Daniel Karzel
2eb135d155
Simplify state transition code
The complexity of the code part was not worth the information we got out of it, so it was simplified.
Should hopefully make it a bit more readable and easier to understand.
3 years ago
Mariusz
c11cb6f51b
Merge pull request #183 from comit-network/request-order-fix
Fix the API breakage on posting a CfdOrderRequest
3 years ago
Mariusz Klochowicz
1f5083fa65
Fix the API breakage on posting a CfdOrderRequest
Recent PR #175 introduced a breaking change and the UI did not get updated.
3 years ago
Thomas Eizinger
5cf03d83bd
Merge pull request #156 from comit-network/payout-curve-api
3 years ago
Thomas Eizinger
43b1d08898
Add API for calculating payout curve
3 years ago
Thomas Eizinger
5d5347ce56
Merge pull request #172 from comit-network/directly-initialize-price-feed
3 years ago
Thomas Eizinger
ee785354f3
Directly initialize feed with list of current CFDs
3 years ago
Thomas Eizinger
fa2ca990a1
Use the same database connection throughout the actor setup
3 years ago
Thomas Eizinger
bbaf66a754
Merge pull request #145 from comit-network/oracle-actor
3 years ago
Mariusz
cf08326c64
Add a taker endpoint for initiating collaborative settlement ( #175 )
* Add a taker endpoint for initiating collaborative settlement
For now, only logs the proposal in the logs on the maker side
3 years ago
Lucas Soriano del Pino
23d7c6110f
Watch relevant olivia announcements and attestations
3 years ago
Daniel Karzel
079322511d
Merge pull request #174 from comit-network/model-update
Clear UI model separation and dynamic actions
3 years ago
Daniel Karzel
558443b97d
Properly configure linting and fix lint errors
Also adds tsc as command so it can more easily be used in run configurations.
3 years ago
Daniel Karzel
faaaed8705
Remove unused code
3 years ago
Daniel Karzel
e8d48ef449
Group case statements of switches in UI
3 years ago
Thomas Eizinger
18d6c6771c
Merge pull request #180 from comit-network/bdk-sqlite
Use sqlite for BDK
3 years ago
Thomas Eizinger
fa87ad90c6
Use sqlite for BDK's database
3 years ago
Thomas Eizinger
57fe104d9c
Selectively depend on bdk features
3 years ago
Thomas Eizinger
a219d90dd0
Update to bdk 0.12
3 years ago
Daniel Karzel
a2fbfedc02
UI state mapping & dynamic actions
All display related decisions are taken in the UI, but on top of the UI's model.
For this purpose we introduce classes for `CfdState` and `Position` so we can add the relevant mapping functions to these classes.
To achieve the mapping from daemon sse even to the `Cfd` / `Order` interface (that now contain classes instead of just primitives) we extend the sse hook to accept a mapping function.
We define this mapping function for `Cfd` and `Order`, because those contain classes, for all others we just use the default mapping.
Actions are dynamically rendered based on the state.
The daemon decides on the action name.
A single post endpoint handles all actions.
The UI maps the actions to icons.
Co-authored-by: Thomas Eizinger <thomas@coblox.tech>
3 years ago
Thomas Eizinger
36521bdee8
Merge pull request #177 from comit-network/fix-contract-setup
Fix parsing of electrum error response
3 years ago
Thomas Eizinger
d78ae049be
Merge pull request #176 from comit-network/fix-electrum-response-parsing
3 years ago
Thomas Eizinger
00883af0a9
Don't panic on unexpected messages
This is actually a security bug as it would allow remote triggers
of panics!
3 years ago
Thomas Eizinger
cf5a3752d3
Improve readability of special handling for electrum error
The default path through the function would be to propagate every
error. However, we want to inspect whether it is one very specific
error.
Make this clear in the code structure by having a dedicated `if let`
for the special case but keep using `?` afterwards.
3 years ago
Thomas Eizinger
fdd50e889e
Fix parsing of electrum error response
3 years ago
Mariusz
e1e3d4bd94
Merge pull request #173 from comit-network/maker-cfd-cleanup
Clean up message handlers in maker_cfd actor
3 years ago
Mariusz Klochowicz
28ecd8a680
Clean up message handlers in maker_cfd actor
No need to pass the message structs into the handlers as they are mostly
superfluous boilerplate and are destructured afterwards anyway.
3 years ago
Thomas Eizinger
d47b97b807
Merge pull request #162 from comit-network/dependabot/cargo/bdk-8c21bcf
Bump bdk from `919522a` to `8c21bcf`
3 years ago
dependabot[bot]
f237b0ee0b
Bump bdk from `919522a` to `8c21bcf`
Bumps [bdk](https://github.com/bitcoindevkit/bdk ) from `919522a` to `8c21bcf`.
- [Release notes](https://github.com/bitcoindevkit/bdk/releases )
- [Commits](919522a456
...8c21bcf40a1fe76637b65c3e483b6c46351f28fa)
---
updated-dependencies:
- dependency-name: bdk
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Thomas Eizinger
59d8590892
Merge pull request #159 from comit-network/more-useful-caches
3 years ago
Mariusz
0bec3ba20c
Merge pull request #171 from comit-network/price-feed-old-version
Restore first version of price feed integration
3 years ago
Thomas Eizinger
9e0504b409
Split cargo CI job into x64 and arm
There is so much conditional logic on compiling for x64 and armv7
that we are better off with just defining two separate jobs without
any conditional logic.
3 years ago
Mariusz Klochowicz
bfbaee08ac
Use current price in profit margin calculations
As the profit margin is connected to the CFD feed, refresh the feed whenever
current price or the CFDs change.
Note: this is not exactly a clean revert, as I head to solve some conflicts when
rebasing.
3 years ago
Mariusz Klochowicz
3badba7067
Revert "Use current price in profit margin calculations"
This reverts commit 4b8237c9d6
.
After last night's conversation, we decided to return to the first version of
the PR, which will come in a subsequent commit.
3 years ago
Daniel Karzel
12bf8f84cb
Merge pull request #160 from comit-network/restart
Handle existing cfds on daemon startup
3 years ago
Daniel Karzel
f5c63dcc31
Merge pull request #168 from comit-network/minor-frontend-fixes
Minor frontend fixes
3 years ago
Daniel Karzel
dde0baadda
Merge pull request #167 from comit-network/use-grids
Use grids where it makes sense
3 years ago
Thomas Eizinger
91522bc4d9
Re-work use of `Skeleton` to hide the content we are loading
Destructing the nullable object into its fields gives us an opportunity
to assign an empty object instead (via `||`).
3 years ago
Daniel Karzel
c3f8b4b35b
Handle existing Cfds upon daemon startup
- Cleanup and transaction (re-)publication
- Monitor actor monitors existing cfds upon startup
3 years ago
Thomas Eizinger
858c181ada
Remove `Updated:` label from timestamp component
This makes it more composable by not forcing the label onto the
user of the component.
3 years ago
Thomas Eizinger
c1c205ab09
Use a grid to model the taker's control panel
This allows us to remove the hard-coded label width.
3 years ago
Thomas Eizinger
067bedbeed
Use grid to model maker's control panel
Using a grid allows us to remove the hardcoded label width.
3 years ago
Thomas Eizinger
bebeb6f1ae
Use Grid to model OrderTile
We can create a grid that has two columns:
- The first one is set to `max-content`.
- The second one is set to `auto`.
This will make the first columns as wide as the widest row and the
second column will take up the remainder of the space given by the
parent container.
3 years ago
Mariusz
5e74e9fd86
Merge pull request #154 from comit-network/price-feed
Display price feed in the UI and use it for profit margin calculations in the CFDs.
3 years ago
Mariusz Klochowicz
4b8237c9d6
Use current price in profit margin calculations
As the profit margin is connected to the CFD feed, refresh the feed whenever
current price or the CFDs change.
Fixes #75 .
3 years ago
Mariusz Klochowicz
641905e6be
Display price feed in the UI
Display both bid and ask price feed from BitMex.
3 years ago
Daniel Karzel
0b29638fbc
Merge pull request #163 from comit-network/frontend-layouting
Layout UI with flexes
3 years ago