- Remove dummy transaction and txid (use the transactions received in the
messages instead
- extract helpers for quote and price to prevent misalignments in tests
- extend contract setup to finish at Open state of the cfd
783: Remove unnecessary default arguments r=thomaseizinger a=thomaseizinger
This is legacy, we don't want any defaults here.
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
765: Setup maker actor r=luckysori a=luckysori
Tests are still failing, but I think it's close, so take a look if you can.
Co-authored-by: Lucas Soriano del Pino <l.soriano.del.pino@gmail.com>
782: Use `xtra-productivty` for `TakeOffer` r=thomaseizinger a=thomaseizinger
This reduces one layer of indirection.
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
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.
777: Bump rust_decimal from 1.17.0 to 1.18.0 r=bonomat a=dependabot[bot]
Bumps [rust_decimal](https://github.com/paupino/rust-decimal) from 1.17.0 to 1.18.0.
<details>
<summary>Commits</summary>
<ul>
<li><a href="6766bafb3a"><code>6766baf</code></a> Version 1.18.0 (<a href="https://github-redirect.dependabot.com/paupino/rust-decimal/issues/447">#447</a>)</li>
<li><a href="b4e72bccc0"><code>b4e72bc</code></a> Add MySQL support for Diesel (<a href="https://github-redirect.dependabot.com/paupino/rust-decimal/issues/446">#446</a>)</li>
<li><a href="2f2d0fbe46"><code>2f2d0fb</code></a> Fixes integer handling in Decimal::to_f64 by expanding range (<a href="https://github-redirect.dependabot.com/paupino/rust-decimal/issues/443">#443</a>)</li>
<li><a href="9b6a1cefe0"><code>9b6a1ce</code></a> Add support for Rocket forms (<a href="https://github-redirect.dependabot.com/paupino/rust-decimal/issues/445">#445</a>)</li>
<li>See full diff in <a href="https://github.com/paupino/rust-decimal/compare/1.17.0...1.18.0">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=rust_decimal&package-manager=cargo&previous-version=1.17.0&new-version=1.18.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
778: Bump reqwest from 0.11.6 to 0.11.7 r=bonomat a=dependabot[bot]
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.6 to 0.11.7.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/seanmonstar/reqwest/releases">reqwest's releases</a>.</em></p>
<blockquote>
<h2>v0.11.7</h2>
<ul>
<li>Add <code>blocking::ClientBuilder::resolve()</code> option, matching the async builder.</li>
<li>Implement <code>From<tokio::fs::File></code> for <code>Body</code>.</li>
<li>Fix <code>blocking</code> request-scoped timeout applying to bodies as well.</li>
<li>(wasm) Fix request bodies using multipart vs formdata.</li>
<li>Update internal <code>rustls</code> to 0.20.</li>
</ul>
<h2>New Contributors ❤️</h2>
<ul>
<li><a href="https://github.com/jeschkies"><code>`@jeschkies</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/pull/1362">seanmonstar/reqwest#1362</a></li>
<li><a href="https://github.com/niuhuan"><code>`@niuhuan</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/pull/1384">seanmonstar/reqwest#1384</a></li>
<li><a href="https://github.com/BiagioFesta"><code>`@BiagioFesta</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/pull/1388">seanmonstar/reqwest#1388</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md">reqwest's changelog</a>.</em></p>
<blockquote>
<h2>v0.11.7</h2>
<ul>
<li>Add <code>blocking::ClientBuilder::resolve()</code> option, matching the async builder.</li>
<li>Implement <code>From<tokio::fs::File></code> for <code>Body</code>.</li>
<li>Fix <code>blocking</code> request-scoped timeout applying to bodies as well.</li>
<li>(wasm) Fix request bodies using multipart vs formdata.</li>
<li>Update internal <code>rustls</code> to 0.20.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="17890f8c2f"><code>17890f8</code></a> v0.11.7</li>
<li><a href="d73d961166"><code>d73d961</code></a> fix blocking client to use request timeout for response body (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1395">#1395</a>)</li>
<li><a href="8b37ae4b15"><code>8b37ae4</code></a> Support to rustls 0.20 (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1388">#1388</a>)</li>
<li><a href="8fe22c4885"><code>8fe22c4</code></a> Remove direct dependency on the time crate (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1390">#1390</a>)</li>
<li><a href="161d731892"><code>161d731</code></a> add resolve to blocking client (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1384">#1384</a>)</li>
<li><a href="0ef1a2ea78"><code>0ef1a2e</code></a> wasm: fix standalone/multipart body conversion to JsValue (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1364">#1364</a>)</li>
<li><a href="ab49de875e"><code>ab49de8</code></a> Body from tokio::fs::File (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1360">#1360</a>)</li>
<li><a href="be8ab7b951"><code>be8ab7b</code></a> docs: provide basic auth example (<a href="https://github-redirect.dependabot.com/seanmonstar/reqwest/issues/1362">#1362</a>)</li>
<li>See full diff in <a href="https://github.com/seanmonstar/reqwest/compare/v0.11.6...v0.11.7">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=reqwest&package-manager=cargo&previous-version=0.11.6&new-version=0.11.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
764: Log target = module r=da-kami a=da-kami
```
2021-11-30 16:39:33 INFO daemon::logger: Initialized logger
2021-11-30 16:39:33 INFO taker: Running version: 0.1.2-11-g09cfe03
```
instead of
```
2021-11-30 14:33:14 INFO Initialized logger
2021-11-30 14:33:14 INFO Running version: 0.1.1-367-gcbc42b6
```
Makes it way easier to interpret logs because we have context who logged what.
Co-authored-by: Daniel Karzel <daniel@comit.network>
767: Update patched `xtra` dependency r=luckysori a=luckysori
The new revision includes 413dc807bd
which could prevent some bugs.
Co-authored-by: Lucas Soriano del Pino <l.soriano.del.pino@gmail.com>
773: Add HTTP API to get cfds and takers r=bonomat a=bonomat
It's useful for a service built on top of the maker as it can just poll and does not have to build up state using sse
Co-authored-by: bonomat <philipp@hoenisch.at>
Once these messages are handled by dedicated actors, this will reduce
the amount to runtime errors a la "this message should be handled by
someone else".
See #696.
763: Refactor bitmex price feed to Actor that reconnects on error r=thomaseizinger a=thomaseizinger
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
761: Introduce a 10s connect timeout r=thomaseizinger a=thomaseizinger
- Cleanup logs for establishing connection
- Introduce a 10s timeout for connecting to the maker
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
770: Bump actions/setup-python from 2.3.0 to 2.3.1 r=bonomat a=dependabot[bot]
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2.3.0 to 2.3.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/setup-python/releases">actions/setup-python's releases</a>.</em></p>
<blockquote>
<h2>Update actions/cache version to 1.0.8</h2>
<p>We have updated <a href="https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md#108">actions/cache</a> dependency version to 1.0.8 to support 10GB cache upload</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="f382193329"><code>f382193</code></a> Update <code>`@actions/cache</code>` version to 1.0.8 (<a href="https://github-redirect.dependabot.com/actions/setup-python/issues/283">#283</a>)</li>
<li><a href="3ef38b826b"><code>3ef38b8</code></a> Create ADR for integrating cache functionality to setup-python action (<a href="https://github-redirect.dependabot.com/actions/setup-python/issues/247">#247</a>)</li>
<li>See full diff in <a href="https://github.com/actions/setup-python/compare/v2.3.0...v2.3.1">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-python&package-manager=github_actions&previous-version=2.3.0&new-version=2.3.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
771: Bump anyhow from 1.0.50 to 1.0.51 r=bonomat a=dependabot[bot]
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.50 to 1.0.51.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dtolnay/anyhow/releases">anyhow's releases</a>.</em></p>
<blockquote>
<h2>1.0.51</h2>
<ul>
<li>Show doc for <code>Ok</code> fn</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="871be23b2c"><code>871be23</code></a> Release 1.0.51</li>
<li><a href="97cff686ef"><code>97cff68</code></a> Show doc for Ok fn</li>
<li>See full diff in <a href="https://github.com/dtolnay/anyhow/compare/1.0.50...1.0.51">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=anyhow&package-manager=cargo&previous-version=1.0.50&new-version=1.0.51)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
772: Bump @types/node from 16.11.10 to 16.11.11 in /taker-frontend r=bonomat a=dependabot[bot]
Bumps [`@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)` from 16.11.10 to 16.11.11.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=`@types/node&package-manager=npm_and_yarn&previous-version=16.11.10&new-version=16.11.11)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)`
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
769: Pass changes in cfd proposals into projection actor r=klochowicz a=klochowicz
Instead of passing the whole HashMap to the projection actor, only send what has
actually changed.
Provide separate messages to update settlement proposal and roll over proposals,
as they will be sent from different actors.
Some type conversions added in this commit are meant to be temporary and will disappear when cfd actors will not be storing a joint hashmap of proposals (both settlement and rollover) anymore.
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
Instead of passing the whole HashMap to the projection actor, only send what has
actually changed.
Provide separate messages to update settlement proposal and roll over proposals,
as they will be sent from different actors.
```
2021-11-30 16:39:33 INFO daemon::logger: Initialized logger
2021-11-30 16:39:33 INFO taker: Running version: 0.1.2-11-g09cfe03
```
instead of
```
2021-11-30 14:33:14 INFO Initialized logger
2021-11-30 14:33:14 INFO Running version: 0.1.1-367-gcbc42b6
```
Makes it way easier to interpret logs because we have context who logged what.
760: Fix the balance-too-low check for the Long button disable r=da-kami a=da-kami
fixes https://github.com/itchysats/itchysats/issues/754
- Pass in the balance so it can be evaluated 🤪
- 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.
Co-authored-by: Daniel Karzel <daniel@comit.network>
- 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.
745: Refactor `maker_inc_connections::Actor` r=luckysori a=luckysori
I'm clearly doing something wrong because the contract setup actor test doesn't pass. For some reason I'm not seeing the solution clearly even though we talked about it, `@thomaseizinger.`
Co-authored-by: Lucas Soriano del Pino <l.soriano.del.pino@gmail.com>
744: Move Cfd types into the projection actor r=klochowicz a=klochowicz
This is the last stage of cleanup / moving things around, before I tackle the actual logic :)
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
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.