mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-03-04 12:39:25 -05:00
![bors[bot]](/assets/img/avatar_default.png)
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>