490: Depend on cfd protocol from `maia` repository r=klochowicz a=klochowicz
Cfd protocol got moved into a separate repository.
All references of `cfd_protocol` were renamed to `maia`.
Patch cargo.toml with a fixed git revision until it gets a public release.
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
Cfd protocol got moved into a separate repository.
All references of `cfd_protocol` were renamed to `maia`.
Patch cargo.toml with a fixed git revision until it gets a public release.
487: Transition to `SetupFailed` if the conract setup failed r=da-kami a=da-kami
Otherwise, the user does not get feedback until restarting the application.
Note: Given what is described in #364 this will be solved in a more complete way. This PR more of a workaround to get user feedback that the contract setup failed. At the moment we don't know until restarting the application which sucks.
Co-authored-by: Daniel Karzel <daniel@comit.network>
485: Remove misleading log r=da-kami a=da-kami
Might have sneaked in during a rebase. This log is just wrong and misleading.
Co-authored-by: Daniel Karzel <daniel@comit.network>
476: Display connection errors to the daemon in the UI r=klochowicz a=klochowicz
Periodically send a keepalive message; if the daemon does not come back with a
response, display a persistent toast notification (at the top of the screen, so
it's harder to miss or confuse).
Notification goes away when the connection to the daemon is re-established.
Fixes#460
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
475: Oracle attestation should not affect all cfds in monitor r=da-kami a=da-kami
fixes#426
Only the attestation relevant for the cfds, based on the event id, should trigger monitoring for the CET.
We now properly filter the monitoring parameters by event id upon attestation.
Without the filter we ran into the error `No CET for oracle event found`, which is expected when trying to find CETs for an event that does not match.
Since an error in the loop can also have unwanted side effects we wrap it with a `try_continue`.
Co-authored-by: Daniel Karzel <daniel@comit.network>
480: Bump vergen from 5.1.16 to 5.1.17 r=klochowicz a=dependabot[bot]
Bumps [vergen](https://github.com/rustyhorde/vergen) from 5.1.16 to 5.1.17.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/rustyhorde/vergen/releases">vergen's releases</a>.</em></p>
<blockquote>
<h2>v5.1.17</h2>
<ul>
<li>Removed unstable lints from nightly/beta.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="63c5da160c"><code>63c5da1</code></a> version bump for next release</li>
<li><a href="8e0e7c05c2"><code>8e0e7c0</code></a> updated lints</li>
<li>See full diff in <a href="https://github.com/rustyhorde/vergen/compare/5.1.16...5.1.17">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=vergen&package-manager=cargo&previous-version=5.1.16&new-version=5.1.17)](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>
Periodically send a keepalive message; if the daemon does not come back with a
response, display a persistent toast notification (at the top of the screen, so
it's harder to miss or confuse).
Notification goes away when the connection to the daemon is re-established.
472: Initialise the `RELEASE_BRANCH` envvar to ensure drafting release PR works r=da-kami a=da-kami
Thanks to `@scratchscratchscratchy` for pointing this out!
474: Provide UI feedback for failed actions in the taker r=klochowicz a=klochowicz
Also:
- improve the handling on the maker side.
- populate errors created within CfdTable
Co-authored-by: Daniel Karzel <daniel@comit.network>
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
Only the attestation relevant for the cfds, based on the event id, should trigger monitoring for the CET.
We now properly filter the monitoring parameters by event id upon attestation.
Without the filter we ran into the error `No CET for oracle event found`, which is expected when trying to find CETs for an event that does not match.
Since an error in the loop can also have unwanted side effects we wrap it with a `try_continue`.
Invoke user actions (cfd actions & taking an order) synchronously in
order to be able to communicate the results.
Use HttpApiProblem to send error details to the frontend in a standard way.
467: Provide UI feedback for failed actions in the maker r=klochowicz a=klochowicz
Taker PR will follow-up after potential issues get resolved.
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
Invoke user actions (cfd actions & posting a new sell order) synchronously in
order to be able to communicate the results.
Use HttpApiProblem to send error details to the frontend in a standard way.
470: Bump anyhow from 1.0.44 to 1.0.45 r=da-kami a=dependabot[bot]
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.44 to 1.0.45.
<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.45</h2>
<ul>
<li>Fix non-compilable macro expansion if downstream crate calls <code>anyhow!</code>, <code>ensure!</code>, or <code>bail!</code> with format args and is built with <code>#![no_std]</code> or <code>#![no_implicit_prelude]</code> (<a href="https://github-redirect.dependabot.com/dtolnay/anyhow/issues/177">#177</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="33ab02c681"><code>33ab02c</code></a> Release 1.0.45</li>
<li><a href="c50588f300"><code>c50588f</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dtolnay/anyhow/issues/177">#177</a> from dtolnay/format</li>
<li><a href="95351e3efe"><code>95351e3</code></a> Refer to format macro by absolute path</li>
<li><a href="263257b7bc"><code>263257b</code></a> Prevent missing rust-src from reinstalling a nightly without miri</li>
<li><a href="3acbb33531"><code>3acbb33</code></a> Disable backtrace build on 1.50</li>
<li><a href="4c386df624"><code>4c386df</code></a> Update ui test suite to nightly-2021-10-13</li>
<li><a href="b5556c90b0"><code>b5556c9</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dtolnay/anyhow/issues/173">#173</a> from dtolnay/newadhoc</li>
<li><a href="ce20d0471a"><code>ce20d04</code></a> Replace macro-generated calls to new_adhoc with Error::msg public API</li>
<li><a href="74fd4a27a3"><code>74fd4a2</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dtolnay/anyhow/issues/170">#170</a> from dtolnay/ensure</li>
<li><a href="c904c82834"><code>c904c82</code></a> Bypass anyhow_kind-based dispatch for ensure! with default msg</li>
<li>Additional commits viewable in <a href="https://github.com/dtolnay/anyhow/compare/1.0.44...1.0.45">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.44&new-version=1.0.45)](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>
469: CFD state machine as of version `0.1.1` r=da-kami a=da-kami
Note that this state machine should be evolved during the refactoring of the model, so we keep track of the changes.
Co-authored-by: Daniel Karzel <daniel@comit.network>
Note that this state machine should be evolved during the refactoring of the model, so we keep track of the changes.
Co-authored-by: DeliciousHair <mshepit@gmail.com>
468: Rename `MustRefund` Cfd state to `PendingRefund` r=klochowicz a=klochowicz
For consistency with PendingClose, PendingCommit, PendingCet - it's analogous to
them, but applies to refund transaction.
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
454: Bump bdk from 0.12.0 to 0.13.0 r=klochowicz a=dependabot[bot]
Bumps [bdk](https://github.com/bitcoindevkit/bdk) from 0.12.0 to 0.13.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/bitcoindevkit/bdk/releases">bdk's releases</a>.</em></p>
<blockquote>
<h2>v0.13.0</h2>
<p>This release of BDK adds new the <code>Wallet::get_tx()</code> function which returns a single transactions made and received by the wallet. It also includes dependency updates to fix recent build and audit issues.</p>
<h2>What's Changed</h2>
<ul>
<li>Downgrade tiny-bip39 to version prior to 0.8.0 by <a href="https://github.com/notmandatory"><code>`@notmandatory</code></a>` in <a href="https://github-redirect.dependabot.com/bitcoindevkit/bdk/pull/444">bitcoindevkit/bdk#444</a></li>
<li>Release/0.12.0 by <a href="https://github.com/notmandatory"><code>`@notmandatory</code></a>` in <a href="https://github-redirect.dependabot.com/bitcoindevkit/bdk/pull/445">bitcoindevkit/bdk#445</a></li>
<li>Expose get_tx() method from <code>DB</code> to <code>Wallet</code> by <a href="https://github.com/rajarshimaitra"><code>`@rajarshimaitra</code></a>` in <a href="https://github-redirect.dependabot.com/bitcoindevkit/bdk/pull/443">bitcoindevkit/bdk#443</a></li>
<li>Pin ahash version to 0.7.4 for sqlite feature by <a href="https://github.com/notmandatory"><code>`@notmandatory</code></a>` in <a href="https://github-redirect.dependabot.com/bitcoindevkit/bdk/pull/449">bitcoindevkit/bdk#449</a></li>
<li>Make MemoryDatabase Send + Sync by <a href="https://github.com/artfuldev"><code>`@artfuldev</code></a>` in <a href="https://github-redirect.dependabot.com/bitcoindevkit/bdk/pull/448">bitcoindevkit/bdk#448</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/artfuldev"><code>`@artfuldev</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/bitcoindevkit/bdk/pull/448">bitcoindevkit/bdk#448</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/bitcoindevkit/bdk/compare/v0.12.0...v0.13.0">https://github.com/bitcoindevkit/bdk/compare/v0.12.0...v0.13.0</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/bitcoindevkit/bdk/blob/v0.13.0/CHANGELOG.md">bdk's changelog</a>.</em></p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="5cb0726780"><code>5cb0726</code></a> Bump version to 0.13.0</li>
<li><a href="8781599740"><code>8781599</code></a> Switch back to rust-bitcoin/rust-bitcoincore-rpc</li>
<li><a href="ee8b992f8b"><code>ee8b992</code></a> Update dev-dependencies electrsd to 0.12</li>
<li><a href="a2e26f1b57"><code>a2e26f1</code></a> Pin version of <code>ureq</code> to maintain our MSRV</li>
<li><a href="5f5744e897"><code>5f5744e</code></a> Pin version of <code>backtrace</code> to maintain our MSRV</li>
<li><a href="e106136227"><code>e106136</code></a> [ci] Update the stable version to 1.56</li>
<li><a href="b638039655"><code>b638039</code></a> Fix CHANGELOG for Unreleased, v0.13.0</li>
<li><a href="7e085a86dd"><code>7e085a8</code></a> Bump version to 0.13.0-rc.1</li>
<li><a href="59f795f176"><code>59f795f</code></a> Make MemoryDatabase Send + Sync</li>
<li><a href="2da10382e7"><code>2da1038</code></a> Pin ahash version to 0.7.4 for sqlite feature</li>
<li>Additional commits viewable in <a href="https://github.com/bitcoindevkit/bdk/compare/v0.12.0...v0.13.0">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=bdk&package-manager=cargo&previous-version=0.12.0&new-version=0.13.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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
462: Add `withdraw` subcommand to taker and maker r=da-kami a=da-kami
Withdraw is an optional subcommand of the network subcommand, so the command reads like this, e.g. taker:
`./taker mainnet withdraw --address ...`
Internally, we use the wallet actor for withdrawing for now (simplifies the implementation, otherwise we would have to extract the wallet construction outside the actor).
ToDo inside the wallet actor:
- [x] wallet drain if no amount is given
- [x] construct transaction based on amount and address
- [x] broadcast transaction and return `Txid`
Co-authored-by: Daniel Karzel <daniel@comit.network>
Withdraw is an optional subcommand of the network subcommand, so the command reads like this, e.g. taker:
`./taker mainnet withdraw --address ...`
Internally, we use the wallet actor for withdrawing for now (simplifies the implementation, otherwise we would have to extract the wallet construction outside the actor).
Fee rate can either be passed by user or is set to default fee rate of `1.0`.
We enable RBF (replace by fee) signalling so that users can bump the transaction fee.
371: Bump clap from 3.0.0-beta.4 to 3.0.0-beta.5 r=da-kami a=dependabot[bot]
Bumps [clap](https://github.com/clap-rs/clap) from 3.0.0-beta.4 to 3.0.0-beta.5.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's changelog</a>.</em></p>
<blockquote>
<h2>v3.0.0-beta.5 (2021-10-18)</h2>
<h4>BREAKING CHANGES</h4>
<ul>
<li><strong>Renamed Features</strong>
<ul>
<li><code>unicode_help</code> to <code>unicode</code> to encompass more functionality</li>
</ul>
</li>
<li><strong>Gated behind features</strong>
<ul>
<li><code>App::replace</code> is now gated behind <code>unstable-replace</code></li>
</ul>
</li>
<li><strong>Removed <code>derive</code> requirement</strong>
<ul>
<li><code>clap::ArgEnum</code></li>
<li><code>clap::Args</code></li>
<li><code>clap::FromArgMatches</code></li>
<li><code>clap::IntoApp</code></li>
<li><code>clap::Subcommand</code></li>
</ul>
</li>
<li><strong>Renamed Traits</strong>
<ul>
<li><code>clap::Clap</code> => <code>clap::Parser</code></li>
</ul>
</li>
<li><strong>Renamed Methods</strong>
<ul>
<li><code>App::generate_usage</code> => <code>App::render_usage</code></li>
</ul>
</li>
<li><strong>Removed Settings</strong>
<ul>
<li><code>AppSettings::DisableVersionForSubcommands</code> is now default behaviour</li>
<li><code>AppSettings::ColoredHelp</code>: we are now relying solely on the <code>color</code> feature flag and <code>App::color</code> method</li>
<li><code>AppSettings::StrictUtf8</code> is now default behaviour</li>
<li><code>AppSettings::AllowInvalidUtf8</code> in favor of <code>ArgSettings::AllowInvalidUtf8</code></li>
<li><code>AppSettings::UnifiedHelpMessage</code> is now default behaviour</li>
<li><code>AppSettings::ColorAlways</code> in favor of <code>App::color</code></li>
<li><code>AppSettings::ColorNever</code> in favor of <code>App::color</code></li>
<li><code>AppSettings::ColorAuto</code> in favor of <code>App::color</code></li>
</ul>
</li>
<li><strong>Removed methods</strong>
<ul>
<li><strong>App</strong>
<ul>
<li><code>App::get_flags</code></li>
<li><code>App::get_positionals_with_no_heading</code></li>
<li><code>App::get_flags_with_no_heading</code></li>
<li><code>App::get_opts_with_no_heading</code></li>
<li><code>App::stop_custom_headings</code> in favor of <code>App:help_heading(None)</code></li>
</ul>
</li>
<li><strong>Error</strong>
<ul>
<li><code>Error::with_description</code> in favor of <code>App::error</code></li>
</ul>
</li>
<li><strong>ArgEnum</strong>
<ul>
<li><code>ArgEnum::as_arg</code> in favor of <code>ArgEnum::to_arg_value</code></li>
</ul>
</li>
<li><strong>clap_generate::Generator</strong>
<ul>
<li><code>Generator::all_subcommands</code></li>
<li><code>Generator::find_subcommand_with_path</code></li>
<li><code>Generator::subcommands</code></li>
<li><code>Generator::shorts_and_visible_aliases</code></li>
<li><code>Generator::longs_and_visible_aliases</code></li>
<li><code>Generator::flags</code></li>
</ul>
</li>
</ul>
</li>
<li><strong>Removed</strong>
<ul>
<li><code>ArgEnum::VARIANTS</code> in favor of <code>ArgEnum::value_variants</code></li>
</ul>
</li>
<li><strong>Deprecated</strong>
<ul>
<li><code>clap::clap_app!</code> in favor of other builders</li>
</ul>
</li>
<li><strong>Changed</strong></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/clap-rs/clap/commits">compare view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=clap&package-manager=cargo&previous-version=3.0.0-beta.4&new-version=3.0.0-beta.5)](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>