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.
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.
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.
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.
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.
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.
`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.
These are mostly copy-pasted from xmr-btc-swap modulo the changelog
handling (because we don't have a changelog).
The gist is:
- We attach release binaries to every release that is created.
- Every merge to master creates a `preview` release.
- A merge from a branch that is named `release/x.y.z` creates a
release `x.y.z`.
- A new release branch can be created via `draft-new-release.yml`.
This goes towards handling all cfd state transitions in one place, so it becomes easier to reason about it.
Currently, state transitions are scattered over the code of the cfd actor.
This change bundles the actual transition in the cfd itself.
Inserting the new state into the db is still in the responsibility of the caller.
note: the `monitor` import in `taker.rs` should technically not be part of this commit, but was needed because I decided that the `CfdMonitoringEvent` should live in the `monitor` actor. But since that is not part of the `Cfd` in `model` the taker needs to know about the `monitor`.
We currently have cases where the CFD might transition to a same state twice when restarting.
Furthermore, we might transition from `Open` to `Open` upon renewal.
Since it is currently unclear if this restriction is really needed we just print a warning in the logs instead of failing.
Bundling the frontend does not necessarily require type checking,
nor should type checking imply bundling.
TSC is also fairly slow. Separate the two and invoke tsc separately in
CI.