Commit Graph

1175 Commits

Author SHA1 Message Date
dependabot[bot]
5b40fe30bb
build(deps): bump bdk from 0.26.0 to 0.27.0
Bumps [bdk](https://github.com/bitcoindevkit/bdk) from 0.26.0 to 0.27.0.
- [Release notes](https://github.com/bitcoindevkit/bdk/releases)
- [Changelog](https://github.com/bitcoindevkit/bdk/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bitcoindevkit/bdk/compare/v0.26.0...v0.27.0)

---
updated-dependencies:
- dependency-name: bdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-13 12:01:22 +00:00
dependabot[bot]
a02d84e2b4
build(deps): bump uuid from 1.2.2 to 1.3.0
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.2.2 to 1.3.0.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.2.2...1.3.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-01 11:04:59 +00:00
dependabot[bot]
633027dd66
build(deps): bump serial_test from 0.10.0 to 1.0.0
Bumps [serial_test](https://github.com/palfrey/serial_test) from 0.10.0 to 1.0.0.
- [Release notes](https://github.com/palfrey/serial_test/releases)
- [Commits](https://github.com/palfrey/serial_test/compare/v0.10.0...v1.0.0)

---
updated-dependencies:
- dependency-name: serial_test
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-18 11:02:15 +00:00
Byron Hambly
7aa6227cbe
build(deps): bump bdk to 0.26
closes #1264
2023-01-11 19:52:21 +02:00
Byron Hambly
30fbb0cdb2
build(deps): bump vergen to 7.5
closes #1266
2023-01-11 19:52:21 +02:00
Byron Hambly
43f06f0705
build(deps): bump base64 to 0.21
closes #1271
2023-01-11 19:52:14 +02:00
Byron Hambly
4ca1f8da5e
ci: update msrv and github actions toolchains 2023-01-10 14:57:09 +02:00
Byron Hambly
9346cb7baf
fix: add debug log for opening monero wallet error 2023-01-10 13:49:32 +02:00
COMIT Botty McBotface
d0d3629bec Prepare release 0.12.1 2023-01-09 13:00:14 +00:00
Byron Hambly
f39e1de964
feat(swap): merge cancel/refund commands into one command 2023-01-08 12:53:56 +02:00
bors[bot]
bfb220984c
Merge #1250
1250: build(deps): bump serial_test from 0.9.0 to 0.10.0 r=delta1 a=dependabot[bot]

Bumps [serial_test](https://github.com/palfrey/serial_test) from 0.9.0 to 0.10.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/palfrey/serial_test/releases">serial_test's releases</a>.</em></p>
<blockquote>
<h2>v0.10.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Pass the function's visibilty to the generated function by <a href="https://github.com/bl-ue"><code>`@​bl-ue</code></a>` in <a href="https://github-redirect.dependabot.com/palfrey/serial_test/pull/81">palfrey/serial_test#81</a></li>
<li>Remove timeout_ms by <a href="https://github.com/palfrey"><code>`@​palfrey</code></a>` in <a href="https://github-redirect.dependabot.com/palfrey/serial_test/pull/83">palfrey/serial_test#83</a></li>
<li>Actually properly support async by <a href="https://github.com/palfrey"><code>`@​palfrey</code></a>` in <a href="https://github-redirect.dependabot.com/palfrey/serial_test/pull/82">palfrey/serial_test#82</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/bl-ue"><code>`@​bl-ue</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/palfrey/serial_test/pull/81">palfrey/serial_test#81</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/palfrey/serial_test/compare/v0.9.0...v0.10.0">https://github.com/palfrey/serial_test/compare/v0.9.0...v0.10.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="d72deb04dc"><code>d72deb0</code></a> 0.10.0</li>
<li><a href="f96580428a"><code>f965804</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/palfrey/serial_test/issues/85">#85</a> from palfrey/1.51-security</li>
<li><a href="44256fd605"><code>44256fd</code></a> Update regex and remove thread_local to fix security issues</li>
<li><a href="29b6e742e3"><code>29b6e74</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/palfrey/serial_test/issues/84">#84</a> from palfrey/1.51.0</li>
<li><a href="f4e3cb5f50"><code>f4e3cb5</code></a> Downgrade a bunch of stuff for 1.51.0 compat</li>
<li><a href="4330da408f"><code>4330da4</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/palfrey/serial_test/issues/82">#82</a> from palfrey/actual-async</li>
<li><a href="177a4f3d24"><code>177a4f3</code></a> Merge branch 'main' into actual-async</li>
<li><a href="cb516b95fb"><code>cb516b9</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/palfrey/serial_test/issues/83">#83</a> from palfrey/remove-timeout</li>
<li><a href="34529be55b"><code>34529be</code></a> Fix use of start only in logging</li>
<li><a href="dbd39cf652"><code>dbd39cf</code></a> Remove timeout_ms</li>
<li>Additional commits viewable in <a href="https://github.com/palfrey/serial_test/compare/v0.9.0...v0.10.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serial_test&package-manager=cargo&previous-version=0.9.0&new-version=0.10.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` 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-01-02 04:22:06 +00:00
COMIT Botty McBotface
d7104c6976 Prepare release 0.12.0 2022-12-31 01:39:45 +00:00
binarybaron
b6201192c2 Allow asb to set a bitcoin address that is controlled by the asb itself to redeem/punish Bitcoin to 2022-12-31 00:52:53 +01:00
binarybaron
39895a176f
Merge branch 'master' into monero-unlocked-balance 2022-12-28 18:41:35 +01:00
dependabot[bot]
c59e638834
build(deps): bump serial_test from 0.9.0 to 0.10.0
Bumps [serial_test](https://github.com/palfrey/serial_test) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/palfrey/serial_test/releases)
- [Commits](https://github.com/palfrey/serial_test/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: serial_test
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-19 11:03:37 +00:00
dependabot[bot]
6e619a1ae1
build(deps): bump base64 from 0.13.1 to 0.20.0
Bumps [base64](https://github.com/marshallpierce/rust-base64) from 0.13.1 to 0.20.0.
- [Release notes](https://github.com/marshallpierce/rust-base64/releases)
- [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/marshallpierce/rust-base64/compare/v0.13.1...v0.20.0)

---
updated-dependencies:
- dependency-name: base64
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-12 11:06:02 +00:00
bors[bot]
ee4273d2d5
Merge #1231
1231:  feat(asb): allow config overrides from env vars r=delta1 a=delta1

- upgrades config crate to 0.13.2 #1087
- adds environment source for config overrides 

This change allows the ASB config to be overridden by env vars starting with `ASB__`. 
Adds a test to check this, and updates the de/serialization of the network `listen` and `external_addresses` fields to be a comma separated string from the environment. The `separator` is a pair of underscores, which is necessary since some of the fields already have underscores in their names. 

Example env var: `ASB__NETWORK__EXTERNAL_ADDRESSES="/dns4/example.org/tcp/9939,/ip4/1.2.3.4/tcp/9940"` 

This particular change will help when running the ASB as a docker container (wip), allowing the config to be set in the env for docker-compose etc. 

Co-authored-by: Byron Hambly <bhambly@blockstream.com>
2022-12-09 07:50:13 +00:00
dependabot[bot]
2401c2f38f
build(deps): bump bdk from 0.24.0 to 0.25.0
Bumps [bdk](https://github.com/bitcoindevkit/bdk) from 0.24.0 to 0.25.0.
- [Release notes](https://github.com/bitcoindevkit/bdk/releases)
- [Changelog](https://github.com/bitcoindevkit/bdk/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bitcoindevkit/bdk/compare/v0.24.0...v0.25.0)

---
updated-dependencies:
- dependency-name: bdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-06 11:03:41 +00:00
Byron Hambly
98296d8fa6
feat(asb): allow config overrides from env vars
- upgrades config crate to 0.13.2 #1087
- adds environment source for config overrides
2022-12-05 11:27:47 +02:00
Byron Hambly
55e7d3f425
Merge branch 'master' into monero-unlocked-balance 2022-12-03 20:57:16 +02:00
Byron Hambly
f0e059c814
docs: update sqlx script and add ci
- upgrades sqlx to 0.6
- fixes sqlite_dev_setup.sh script
- adds ci to test the script
2022-11-30 15:30:32 +02:00
Byron Hambly
08426d8171
fixup! fix(asb): use unlocked monero balance for quotes 2022-11-29 14:18:42 +02:00
bors[bot]
e5e7de757e
Merge #1225
1225: fix(cli, asb): print update warning correctly formatted r=delta1 a=binarybaron



Co-authored-by: binarybaron <86064887+binarybaron@users.noreply.github.com>
2022-11-25 13:45:12 +00:00
binarybaron
52871c9fc8 Print update warning correctly formatted 2022-11-25 13:58:58 +01:00
Byron Hambly
cd3ba4905a
feat: add wallet database migration from older bdk
- upgrades to bdk 0.24 #1198
- adds a regression test for opening older wallets #1183
- adds a migration for older wallets that encounter the ChecksumMismatch
  error #1182
2022-11-23 12:23:21 +02:00
binarybaron
4f89b3d768 Add monero-wallet-rpc DOWNLOAD_URL for M1, M2 Mac 2022-11-12 15:31:53 +01:00
binarybaron
f09b237e15
Immediately fetch transaction status upon subscription
Immediately fetch transaction status upon subscription instead of waiting 1 minute

(cherry picked from commit 5662f7fe81)
2022-11-07 09:56:27 +02:00
Byron Hambly
3d12631d69
feat: upgrade monero images to v0.18.1.2 2022-11-07 09:53:50 +02:00
Byron Hambly
f224c49584
fix(asb): use unlocked monero balance for quotes 2022-11-07 09:52:58 +02:00
Byron Hambly
fb42ca13cc
chore: clippy fix 2022-10-19 15:02:46 +02:00
dependabot[bot]
17067579bb
build(deps): bump uuid from 1.1.2 to 1.2.0
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.1.2 to 1.2.0.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.1.2...1.2.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-08 04:34:38 +00:00
Byron Hambly
ef7922f898
build(deps): bump bdk to 0.23 2022-10-07 20:34:27 +02:00
dependabot[bot]
160e454f9e
build(deps): bump comfy-table from 5.0.1 to 6.1.0
Bumps [comfy-table](https://github.com/nukesor/comfy-table) from 5.0.1 to 6.1.0.
- [Release notes](https://github.com/nukesor/comfy-table/releases)
- [Changelog](https://github.com/Nukesor/comfy-table/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nukesor/comfy-table/compare/v5.0.1...v6.1.0)

---
updated-dependencies:
- dependency-name: comfy-table
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-14 11:36:33 +00:00
Byron Hambly
2c2fb7f350
deps(build): upgrade ecdsa_fun and sigma_fun
- #1139
- #1140
2022-09-13 14:19:58 +02:00
Byron Hambly
6e7e39eea4
build(deps): upgrade bdk, ecdsa_fun, sigma_fun, sha2, bitcoin-harness, serde
- bdk to 0.22.0 #1126
- ecdsa_fun to 7c3d592 #1127
- sigma_fun to 7c3d592 #1128
- sha2 to 0.10.2 #948
- serde to 1.0.144 #1115
- bitcoin-harness to bff9a64

Revert "ci: specify previous dprint version until fixed"
This reverts commit 11eb1737ce.
2022-09-12 12:03:24 +02:00
COMIT Botty McBotface
c093ae315d Prepare release 0.11.0 2022-08-11 12:42:06 +00:00
Byron Hambly
bf23eee0cb
docs: add gpg key readme and delta1.asc 2022-08-11 13:05:21 +02:00
Byron Hambly
249e97826f
feat: check swap cli wallet rpc version and remove if not fluorine fermi
- swap cli will check its wallet rpc version and delete the binary if
  its version does not match on "Fluorine Fermi". it will then download
  the newer version.
- adds download progress for wallet rpc
2022-08-10 21:35:22 +02:00
Byron Hambly
0a7a27327e
feat: upgrade to monero 0.18 2022-08-10 21:22:11 +02:00
bors[bot]
0d794a13d0
Merge #1008
1008: Upgrade libp2p and stabilized the version r=delta1 a=lescuer97

This is an upgrade for libp2p, I did a previous PR but got mixed up with rebases

Co-authored-by: leonardo <leoescuer@protonmail.com>
Co-authored-by: Leonardo Escuer <47948594+lescuer97@users.noreply.github.com>
Co-authored-by: Byron Hambly <bhambly@blockstream.com>
2022-08-10 12:10:57 +00:00
Byron Hambly
4b09ffd4df
refactor: check for latest release
DRYs up the code for checking latest release from github.
2022-08-08 13:35:40 +02:00
Byron Hambly
493324ce1b
Merge remote-tracking branch 'upstream/master' into latest_version_check 2022-08-08 11:43:11 +02:00
bors[bot]
20ff6ade9b
Merge #1071 #1083
1071: Bump pem from 1.0.2 to 1.1.0 r=delta1 a=dependabot[bot]

Bumps [pem](https://github.com/jcreekmore/pem-rs) from 1.0.2 to 1.1.0.
<details>
<summary>Commits</summary>
<ul>
<li><a href="2d83242a3e"><code>2d83242</code></a> (cargo-release) version 1.1.0</li>
<li><a href="0b37bd8925"><code>0b37bd8</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/jcreekmore/pem-rs/issues/34">#34</a> from tmpfs/serde-feature</li>
<li><a href="6381ef4f29"><code>6381ef4</code></a> Update docs.</li>
<li><a href="1f22b5fd0a"><code>1f22b5f</code></a> Update serde implementation to use encode()/parse().</li>
<li><a href="79cf854fca"><code>79cf854</code></a> Support optional serde feature.</li>
<li><a href="2ebf2b1857"><code>2ebf2b1</code></a> (cargo-release) start next development iteration 1.0.3-alpha.0</li>
<li>See full diff in <a href="https://github.com/jcreekmore/pem-rs/compare/v1.0.2...v1.1.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pem&package-manager=cargo&previous-version=1.0.2&new-version=1.1.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` 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>

1083: build(deps): bump async-trait from 0.1.56 to 0.1.57 r=delta1 a=dependabot[bot]

Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.56 to 0.1.57.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dtolnay/async-trait/releases">async-trait's releases</a>.</em></p>
<blockquote>
<h2>0.1.57</h2>
<ul>
<li>Add categories to crates.io metadata</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="7aa083ce02"><code>7aa083c</code></a> Release 0.1.57</li>
<li><a href="4124033b58"><code>4124033</code></a> Revert &quot;Temporarily disable clippy on tests due to ICE&quot;</li>
<li><a href="81704b37d0"><code>81704b3</code></a> Add categories to crates.io metadata</li>
<li><a href="f997ace3e9"><code>f997ace</code></a> Sort package entries in Cargo.toml</li>
<li><a href="a386446d3d"><code>a386446</code></a> Avoid cargo 1.43–1.45 in GitHub Actions</li>
<li><a href="2cc3532baf"><code>2cc3532</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dtolnay/async-trait/issues/209">#209</a> from dtolnay/ice</li>
<li><a href="f1d674605b"><code>f1d6746</code></a> Temporarily disable clippy on tests due to ICE</li>
<li><a href="c93e97c451"><code>c93e97c</code></a> Ignore explicit_auto_deref clippy lint</li>
<li><a href="408e77f5d4"><code>408e77f</code></a> Update ui test suite to nightly-2022-07-02</li>
<li><a href="d0a7da03f5"><code>d0a7da0</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dtolnay/async-trait/issues/208">#208</a> from dtolnay/oncecell</li>
<li>Additional commits viewable in <a href="https://github.com/dtolnay/async-trait/compare/0.1.56...0.1.57">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=async-trait&package-manager=cargo&previous-version=0.1.56&new-version=0.1.57)](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` 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>
2022-08-04 13:28:43 +00:00
Byron Hambly
7838442947
fix: review comments from binarybaron 2022-08-04 15:01:22 +02:00
Byron Hambly
dc68344b62
chore: formatting in select! macro 2022-08-04 14:29:23 +02:00
Byron Hambly
ec169916d6
Merge branch 'master' into libp2p_upgrade 2022-08-03 22:07:24 +02:00
bors[bot]
a9d9250af1
Merge #1088
1088: feat: add debugging info for failed to fetch transaction r=delta1 a=delta1

Add the jsonrpc error message and data to tracing calls to try debug #1061 "monero-wallet-rpc failed to fetch transaction"

Co-authored-by: Byron Hambly <bhambly@blockstream.com>
2022-08-03 13:10:10 +00:00
Byron Hambly
7e4af68cba
feat: add debugging info for failed to fetch transaction
Add the jsonrpc error message and data to tracing calls to try debug #1061
"monero-wallet-rpc failed to fetch transaction"
2022-08-03 14:07:16 +02:00
bors[bot]
cb7a7f58b2
Merge #1086
1086: fix btc for xmr calculation error r=delta1 a=delta1

The calculation overflow fix in #1068 did not account for XMR < 1 which
resulted in truncation when dividing by the PICO_OFFSET.

This commit uses `Decimal` to do the calculation at fixed precision and
adds a number of test values to verify the calculation.

Closes #1084

Co-authored-by: Byron Hambly <bhambly@blockstream.com>
2022-08-03 11:57:08 +00:00
Byron Hambly
86d57453cf
fix: fix btc for xmr calculation error
The calculation overflow fix in #1068 did not account for XMR < 1 which
resulted in truncation when dividing by the PICO_OFFSET.

This commit uses `Decimal` to do the calculation at fixed precision and
adds a number of test values to verify the calculation.

Closes #1084
2022-08-03 12:30:51 +02:00