911: Introduce funding fee in payout calculations r=luckysori a=luckysori
Work towards #244.
Co-authored-by: Lucas Soriano del Pino <lucas_soriano@fastmail.com>
909: Hide internal actors from rocket state r=rishflab a=rishflab
Partially addresses #774
will squash after review
Co-authored-by: rishflab <rishflab@hotmail.com>
917: Make oracle and monitor actor load CFDs from DB r=thomaseizinger a=thomaseizinger
With event sourcing, these actors will use a different model. Passing
them the DB connection directly now makes this change easier.
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
916: Move init of syncing task to respective actor r=thomaseizinger a=thomaseizinger
This reduces code duplication across maker and taker.
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
904: Cleanup dependencies in `taker-frontend` r=thomaseizinger a=thomaseizinger
Read the commit messages for details.
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
900: Use single generic enum for protocol completion status r=klochowicz a=klochowicz
See commit messages.
TODO: CollaborativeSettlement will come in a separate PR.
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
Use the same enum across:
- setup taker,
- setup maker,
- rollover taker
Generic enum contains a reason in the Rejection case - if it's not specified, it
defaults to "unknown".
Note: Completed::Succeeded uses a marker type to allow distinguishing the
protocol in the cfd actor message handlers.
In general, we would like to let the sender of an `xtra::Message` to
be able to handle all the possible errors. The `log_error` macro
catered to the complete opposite use case, so we remove it.
In order to make error handling at the sending site more ergonomic, we
introduce a `LogFailure` trait designed for fallible `xtra::Messages`.
With this patch we've tried to change _where_ we handle errors, but
not _what_ we do with them.
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.
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.
880: Auto-rollover r=thomaseizinger a=da-kami
resolves#456
Note: I'm looking forward to the event sourcing model. Getting this working in the current state model is quite cumbersome.
Fixes https://github.com/itchysats/itchysats/issues/892. (settlement interval is reduced)
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
903: Bump framer-motion from 5.4.5 to 5.5.1 in /taker-frontend r=thomaseizinger a=dependabot[bot]
Bumps [framer-motion](https://github.com/framer/motion) from 5.4.5 to 5.5.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/framer/motion/blob/main/CHANGELOG.md">framer-motion's changelog</a>.</em></p>
<blockquote>
<h2>[5.5.1] 2021-12-14</h2>
<h3>Fixed</h3>
<ul>
<li>Removed dynamic resolution scaling from <code>LayoutCamera</code> to fix crash in iOS.</li>
</ul>
<h2>[5.5.0] 2021-12-14</h2>
<h3>Added</h3>
<ul>
<li><code>LayoutCamera</code> and <code>LayoutOrthographicCamera</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="a2184f5150"><code>a2184f5</code></a> 5.5.1</li>
<li><a href="ef150aaadd"><code>ef150aa</code></a> Removing dynamic resolution scaling</li>
<li><a href="715362723f"><code>7153627</code></a> Updating changelog</li>
<li><a href="5f0c3a772d"><code>5f0c3a7</code></a> Updating internal rendering resolution:</li>
<li><a href="8cfdd8b115"><code>8cfdd8b</code></a> 5.5.0</li>
<li><a href="28b1ce3c7e"><code>28b1ce3</code></a> Feature/layout camera (<a href="https://github-redirect.dependabot.com/framer/motion/issues/1393">#1393</a>)</li>
<li><a href="fe8c226dbd"><code>fe8c226</code></a> Feature/three final (<a href="https://github-redirect.dependabot.com/framer/motion/issues/1391">#1391</a>)</li>
<li>See full diff in <a href="https://github.com/framer/motion/compare/v5.4.5...v5.5.1">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=framer-motion&package-manager=npm_and_yarn&previous-version=5.4.5&new-version=5.5.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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
899: Rename database function for loading CFDs r=thomaseizinger a=thomaseizinger
With the removal of the order from the DB, we are loading a CFD by
its ID which just happens to be the order id but that is no longer
relevant at this stage.
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
With the removal of the order from the DB, we are loading a CFD by
its ID which just happens to be the order id but that is no longer
relevant at this stage.
893: Bump serde_json from 1.0.72 to 1.0.73 r=thomaseizinger a=dependabot[bot]
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.72 to 1.0.73.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/serde-rs/json/releases">serde_json's releases</a>.</em></p>
<blockquote>
<h2>v1.0.73</h2>
<ul>
<li>Update <code>itoa</code> dependency to 1.0</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="296f718e18"><code>296f718</code></a> Release 1.0.73</li>
<li><a href="48455de674"><code>48455de</code></a> Update to itoa 1.0</li>
<li><a href="b66b0eb322"><code>b66b0eb</code></a> Track raw pointers in miri CI run</li>
<li><a href="52eec5e2ee"><code>52eec5e</code></a> Add a miri test job in CI</li>
<li><a href="aaaf125f0b"><code>aaaf125</code></a> Disable TcpStream test on miri</li>
<li><a href="f0774c482a"><code>f0774c4</code></a> Raise required rustc from 1.31 to 1.36</li>
<li><a href="c3eddcdf40"><code>c3eddcd</code></a> Collect imports to top of test suite</li>
<li><a href="a28529ddc9"><code>a28529d</code></a> Skip ui test when running in miri</li>
<li><a href="7db1ea907d"><code>7db1ea9</code></a> Ignore needless_late_init Clippy lint</li>
<li><a href="fc0ca07b10"><code>fc0ca07</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/serde-rs/json/issues/831">#831</a> from serde-rs/from_u32</li>
<li>Additional commits viewable in <a href="https://github.com/serde-rs/json/compare/v1.0.72...v1.0.73">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde_json&package-manager=cargo&previous-version=1.0.72&new-version=1.0.73)](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>
Making all fields private revealed some weirdness in how we compute
the position of the CFD. For an order, it made sense that we store
the `origin` of it. For a CFD however, it makes more sense to store
the position and role of the actor explicitly and derive other
information from there.
Electrum sometimes returns error code -27
bad-txns-inputs-missingorspent. This can occur because the transaction
has been published. Electrum should return error code -25 transaction
already on chain. In the case of error code -27 we now check if the
transaction is on chain and return ok if it is.