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
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
Daniel Karzel
1d63518b8b
Merge pull request #164 from comit-network/table-header
Remove the span that does not align the table header properly
3 years ago
Daniel Karzel
6aaf4f56b1
Remove the span that does not align the table header properly
When sorting the triangle appears next to the header text - that is expected and standard behaviour.
The span was always rendered (also with no sorting), and message up the alignment of the text.
Additionally add a text-align right for fixing the `State` header, that was somewhat floating around.
3 years ago
Daniel Karzel
410ded4a24
Layout UI
The Grid was restrictive and caused problems overlapping things.
We can achieve better layouting with flex components (for now mostly HStack and VStack flexes).
We can eventually also add space bounds to the flexes for more layourting (i.e. graph should take 70% on right...), but for now I kept it rather simple.
I experimented with Grids for the tiles where we group information (i.e. Buy, Order) but it did not look good, so I amd using flexes with fixed label width for better looks.
3 years ago
Thomas Eizinger
bfa7db680f
Merge pull request #158 from comit-network/inc-connection-actor
3 years ago
Lucas Soriano
accb5fcbbb
Merge pull request #157 from comit-network/good-at-maths
Fix `MAX_PRICE_DEC`
3 years ago
Mariusz
d5698614df
Merge pull request #155 from comit-network/xtra-upgrade
Use latest github snapshot of xtra
3 years ago
Mariusz Klochowicz
699ddcf95a
Use latest github snapshot of xtra
Master branch includes some desired fixes, such as clippy warnings when a future
has not been awaited.
3 years ago
Thomas Eizinger
5883890858
Merge pull request #153 from comit-network/cfd-setup-actor
Refactor setup_contract to be just an async function
3 years ago
Thomas Eizinger
2922e03ae1
Use `Address::attach_stream` for incoming connections
This removes a layer of indirection upon new connections.
3 years ago
Thomas Eizinger
904d81d51f
Refactor setup_contract to be just an async function
This allows us to more easily fail gracefully during its execution
because we can simply return a `Result`.
3 years ago
Thomas Eizinger
c74f057254
Move impls to the bottom
3 years ago
Thomas Eizinger
7ce5ea47df
Wait for message to be actually sent on the wire
3 years ago
Thomas Eizinger
aaeb2a5809
Have messages return `()` instead of `Result`
3 years ago
Thomas Eizinger
e677ba7a74
Replace `taker_inc_message_actor` with `Address::attach_stream`
`attach_stream` uses `send` under the hood which will process messages
in order. This will guarantee that the `taker_cfd::Actor` processes the
messages in the order they come in on the wire. That allows us to assume
that we will always get the `Accept` message before the first `Setup` message.
3 years ago
Thomas Eizinger
0d1406ec63
Replace `in_taker_messages` with `Address::attach_stream`
3 years ago
Thomas Eizinger
eda1b88b0a
Introduce a dedicated codec
3 years ago
Thomas Eizinger
47c9b85c1a
Log errors with source chain
See anyhow docs for details.
3 years ago
Lucas Soriano del Pino
d168b07065
Fix MAX_PRICE_DEC
2^20 is 21 bits long, _not_ 20 bits long. If we allow a bound equal to
2^20 we would need 21 bits to represent it, past our limit of 20.
3 years ago
Thomas Eizinger
8d95008a24
Merge pull request #144 from comit-network/release-workflows
Add standard release workflows
3 years ago