Commit graph

2472 commits

Author SHA1 Message Date
binarybaron
b51b0e02d6 Return error to API caller if bid quote request fails 2023-11-08 22:41:30 +01:00
Lorenzo Tucci
f9912b66da
Improve debug text for swap resume 2023-11-06 22:18:06 +02:00
Lorenzo Tucci
28b0e06f78
Remove inner tokio::select in BuyXmr and Resume 2023-11-06 22:14:53 +02:00
binarybaron
2634b55fc1 Release swap lock after receiving shutdown signal 2023-11-06 20:24:50 +01:00
binarybaron
2c6c7b964c Spawn event loop before requesting quote 2023-11-06 19:24:59 +01:00
binarybaron
a53a420794 Remove unnecessary swap suspension listener from determine_btc_to_swap call in BuyXmr 2023-11-06 16:05:32 +01:00
Lorenzo Tucci
c7f411c8c9
Moving swap initialization code inside tokio select block to handle swap lock release logic 2023-11-03 19:13:17 +02:00
Lorenzo Tucci
4e631759b2
cargo fmt 2023-10-07 19:02:11 +03:00
Lorenzo Tucci
c0e759e9f2
moving buy_xmr initialization code out of spawned tasks 2023-10-04 21:14:14 +03:00
binarybaron
18311f74c4 Use in_current_span to pass down tracing span to spawned tasks 2023-10-03 18:30:03 +02:00
Lorenzo Tucci
bb374fe7ba
Merge branch 'rpc-server' of github.com:yamabiiko/xmr-btc-swap into rpc-server 2023-10-01 14:44:21 +03:00
Lorenzo Tucci
d2d778f2ca
move resume swap initialization code out of spawned task 2023-10-01 14:43:53 +03:00
yamabiiko
c531034f36
Merge branch 'master' into rpc-server 2023-10-01 14:04:44 +03:00
Lorenzo Tucci
8a3dc61525
cargo clippy fixes 2023-10-01 14:03:42 +03:00
Lorenzo Tucci
9c79738e69
merge with master 2023-10-01 13:39:43 +03:00
bors[bot]
c93eaa8057
Merge #1447
1447: Update lock timeout to 10 min r=binarybaron a=pokkst

This updates the lock timeout from 3 min to 10 min.

Over Tor, it is sometimes very slow to setup a swap, completely missing the 3 minute window. The BTC will still lock and broadcast, but the ASB will have already stopped watching for the lock tx, thus will not lock the XMR once the BTC lock tx confirms. This mitigates that issue.

Co-authored-by: pokkst <pokkst@protonmail.com>
2023-09-30 19:13:34 +00:00
Byron Hambly
8b7e85dab0
remove otp file 2023-09-29 15:45:16 +02:00
Byron Hambly
28c2530385
clippy --fix 2023-09-29 15:14:16 +02:00
Byron Hambly
4396c7db8b
test: fix assert 2023-09-29 15:13:52 +02:00
pokkst
5182b4f53a
Update lock timeout to 10 min 2023-09-29 08:08:25 -05:00
Byron Hambly
e0891e08c5
fix compile and warnings in tests/rpc.rs 2023-09-29 15:02:29 +02:00
binarybaron
202206a3e8 Update rpc tests 2023-09-26 17:46:19 +02:00
binarybaron
d7b0d068b6 Merge branch 'rpc-server' of https://github.com/yamabiiko/xmr-btc-swap into rpc-server 2023-09-24 19:50:42 +02:00
binarybaron
d3bb838806 WIP: Integration tests for RPC server 2023-09-24 19:47:35 +02:00
binarybaron
50f929aea4 Merge branch 'rpc-server' of https://github.com/yamabiiko/xmr-btc-swap into rpc-server 2023-09-24 17:31:17 +02:00
binarybaron
03be15b069 WIP: RPC server integration tests 2023-09-24 17:30:05 +02:00
bors[bot]
2de492f23a
Merge #1445
1445: Release version 0.12.3 r=binarybaron a=comit-botty-mc-botface

Hi `@binarybaron!`

This PR was created in response to a manual trigger of the release workflow here: 6252660853.
I've updated the changelog and bumped the versions in the manifest files in this commit: 7824078975.

Merging this PR will create a GitHub release and upload any assets that are created as part of the release build.

Co-authored-by: COMIT Botty McBotface <botty@coblox.tech>
2023-09-23 20:04:24 +00:00
Lorenzo Tucci
959a309d0e
Merge branch 'rpc-server' of github.com:yamabiiko/xmr-btc-swap into rpc-server 2023-09-22 23:29:35 +03:00
Lorenzo Tucci
ec0bc8cd39
fixing test_cli_arguments and other tests 2023-09-22 23:28:49 +03:00
binarybaron
3c39a34a6e Remove unnecessary success property on suspend_current_swap response 2023-09-21 16:15:36 +02:00
binarybaron
bd2aef796d Fix typo in rpc server stopped tracing log 2023-09-21 15:21:05 +02:00
COMIT Botty McBotface
7824078975 Prepare release 0.12.3 2023-09-20 18:34:50 +00:00
binarybaron
f367c2ba49 Rename get_raw_history tp get_raw_states 2023-09-08 12:53:33 +02:00
binarybaron
2ec465aec7 Merge branch 'rpc-server' of https://github.com/yamabiiko/xmr-btc-swap into rpc-server 2023-09-08 12:52:04 +02:00
bors[bot]
a3455d6032
Merge #1443
1443: Add CHANGELOG entry for PR 1441 r=binarybaron a=binarybaron



Co-authored-by: binarybaron <86064887+binarybaron@users.noreply.github.com>
2023-09-08 09:45:43 +00:00
binarybaron
332fd39164
Add CHANGELOG entry for PR 1441 2023-09-08 11:45:10 +02:00
bors[bot]
7d6b1c2244
Merge #1441
1441: Dynamically choose monero daemon to connect to r=delta1 a=binarybaron

The GUI now does this with https://github.com/UnstoppableSwap/unstoppableswap-gui/pull/157. However, ideally, this should be handled by swap itself and not by a third party wrapper which is why this PR implements a similar behaviour for  swap. On startup we loop through list of public Monero daemons and choose one dynamically based on their response to the get_info RPC call.

Co-authored-by: binarybaron <86064887+binarybaron@users.noreply.github.com>
2023-09-08 07:20:57 +00:00
binarybaron
3467523849 Dynamically choose monero daemon to connect to 2023-09-07 19:10:23 +02:00
bors[bot]
1f793c5d98
Merge #1442
1442: build(deps): bump actions/checkout from 3.5.3 to 4.0.0 r=delta1 a=dependabot[bot]

Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 4.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/checkout/releases">actions/checkout's releases</a>.</em></p>
<blockquote>
<h2>v4.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update default runtime to node20 by <a href="https://github.com/takost"><code>`@​takost</code></a>` in <a href="https://redirect.github.com/actions/checkout/pull/1436">actions/checkout#1436</a></li>
<li>Support fetching without the --progress option by <a href="https://github.com/simonbaird"><code>`@​simonbaird</code></a>` in <a href="https://redirect.github.com/actions/checkout/pull/1067">actions/checkout#1067</a></li>
<li>Release 4.0.0 by <a href="https://github.com/takost"><code>`@​takost</code></a>` in <a href="https://redirect.github.com/actions/checkout/pull/1447">actions/checkout#1447</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/takost"><code>`@​takost</code></a>` made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/1436">actions/checkout#1436</a></li>
<li><a href="https://github.com/simonbaird"><code>`@​simonbaird</code></a>` made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/1067">actions/checkout#1067</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v3...v4.0.0">https://github.com/actions/checkout/compare/v3...v4.0.0</a></p>
<h2>v3.6.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Mark test scripts with Bash'isms to be run via Bash by <a href="https://github.com/dscho"><code>`@​dscho</code></a>` in <a href="https://redirect.github.com/actions/checkout/pull/1377">actions/checkout#1377</a></li>
<li>Add option to fetch tags even if fetch-depth &gt; 0 by <a href="https://github.com/RobertWieczoreck"><code>`@​RobertWieczoreck</code></a>` in <a href="https://redirect.github.com/actions/checkout/pull/579">actions/checkout#579</a></li>
<li>Release 3.6.0 by <a href="https://github.com/luketomlinson"><code>`@​luketomlinson</code></a>` in <a href="https://redirect.github.com/actions/checkout/pull/1437">actions/checkout#1437</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/RobertWieczoreck"><code>`@​RobertWieczoreck</code></a>` made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/579">actions/checkout#579</a></li>
<li><a href="https://github.com/luketomlinson"><code>`@​luketomlinson</code></a>` made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/1437">actions/checkout#1437</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v3.5.3...v3.6.0">https://github.com/actions/checkout/compare/v3.5.3...v3.6.0</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's changelog</a>.</em></p>
<blockquote>
<h2>v4.0.0</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/1067">Support fetching without the --progress option</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/1436">Update to node20</a></li>
</ul>
<h2>v3.6.0</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/1377">Fix: Mark test scripts with Bash'isms to be run via Bash</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/579">Add option to fetch tags even if fetch-depth &gt; 0</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="3df4ab11eb"><code>3df4ab1</code></a> Release 4.0.0 (<a href="https://redirect.github.com/actions/checkout/issues/1447">#1447</a>)</li>
<li><a href="8b5e8b7687"><code>8b5e8b7</code></a> Support fetching without the --progress option (<a href="https://redirect.github.com/actions/checkout/issues/1067">#1067</a>)</li>
<li><a href="97a652b800"><code>97a652b</code></a> Update default runtime to node20 (<a href="https://redirect.github.com/actions/checkout/issues/1436">#1436</a>)</li>
<li><a href="f43a0e5ff2"><code>f43a0e5</code></a> Release 3.6.0 (<a href="https://redirect.github.com/actions/checkout/issues/1437">#1437</a>)</li>
<li><a href="7739b9ba2e"><code>7739b9b</code></a> Add option to fetch tags even if fetch-depth &gt; 0 (<a href="https://redirect.github.com/actions/checkout/issues/579">#579</a>)</li>
<li><a href="96f53100ba"><code>96f5310</code></a> Mark test scripts with Bash'isms to be run via Bash (<a href="https://redirect.github.com/actions/checkout/issues/1377">#1377</a>)</li>
<li>See full diff in <a href="https://github.com/actions/checkout/compare/v3.5.3...v4.0.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=3.5.3&new-version=4.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR 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` show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- ``@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>
2023-09-05 12:48:19 +00:00
dependabot[bot]
a96527fc2a
build(deps): bump actions/checkout from 3.5.3 to 4.0.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 4.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.5.3...v4.0.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 11:38:13 +00:00
bors[bot]
191247efeb
Merge #1440
1440: Update build-release-binaries.yml rustc version to 1.67 r=binarybaron a=binarybaron



Co-authored-by: binarybaron <86064887+binarybaron@users.noreply.github.com>
2023-09-02 19:35:37 +00:00
binarybaron
16c1daea78
Update build-release-binaries.yml rustc version to 1.67 2023-09-02 19:15:15 +02:00
bors[bot]
5b162368ca
Merge #1438
1438: Revert "Refresh monero monitoring wallet at startup to ensure daemon is is av…" r=binarybaron a=binarybaron

Reverts comit-network/xmr-btc-swap#1436

Co-authored-by: binarybaron <86064887+binarybaron@users.noreply.github.com>
2023-09-01 15:36:24 +00:00
binarybaron
2e1909685d
Revert "Refresh monero monitoring wallet at startup to ensure daemon is is av…" 2023-09-01 17:36:00 +02:00
Lorenzo Tucci
a6f2180b1b
fix rpc tests, only check for RPC errors and not returned values 2023-09-01 17:15:24 +03:00
Lorenzo Tucci
ccf9b0c31f
fix compile issues for tests and use serial_test crate 2023-09-01 12:31:39 +03:00
Lorenzo Tucci
9b08f71bb8
merge upstream and fix some tests 2023-09-01 12:06:13 +03:00
bors[bot]
a34c112622
Merge #1436
1436: Refresh monero monitoring wallet at startup to ensure daemon is is av… r=delta1 a=binarybaron

…ailable

Co-authored-by: binarybaron <86064887+binarybaron@users.noreply.github.com>
2023-08-31 12:04:54 +00:00
binarybaron
844ebc7de3 Refresh monero monitoring wallet at startup to ensure daemon is is available 2023-08-31 00:47:18 +02:00
bors[bot]
d664f1e71d
Merge #1435
1435: Use older version sqlx-cli to be compatible with MSRV r=binarybaron a=binarybaron



Co-authored-by: binarybaron <86064887+binarybaron@users.noreply.github.com>
2023-08-30 20:43:37 +00:00