AthanorLabs / atomic-swap

💫 ETH-XMR atomic swap implementation
GNU Lesser General Public License v3.0
345 stars 44 forks source link

min and max offer amount checks #445

Closed dimalinux closed 1 year ago

dimalinux commented 1 year ago

Maker min/max changes:

Taker min/max validations before offer is taken:

Misc changes:

Closes: #437 Closes #438 Closes #286 Closes #434

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 78.18% and project coverage change: -1.52 :warning:

Comparison is base (906a5c6) 59.47% compared to head (f28b359) 57.96%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #445 +/- ## ========================================== - Coverage 59.47% 57.96% -1.52% ========================================== Files 121 124 +3 Lines 11115 11601 +486 ========================================== + Hits 6611 6724 +113 - Misses 3786 4150 +364 - Partials 718 727 +9 ``` | [Impacted Files](https://codecov.io/gh/AthanorLabs/atomic-swap/pull/445?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [coins/common.go](https://codecov.io/gh/AthanorLabs/atomic-swap/pull/445?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-Y29pbnMvY29tbW9uLmdv) | `100.00% <ø> (ø)` | | | [ethereum/erc20\_token.go](https://codecov.io/gh/AthanorLabs/atomic-swap/pull/445?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-ZXRoZXJldW0vZXJjMjBfdG9rZW4uZ28=) | `3.43% <ø> (ø)` | | | [relayer/claim\_request.go](https://codecov.io/gh/AthanorLabs/atomic-swap/pull/445?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cmVsYXllci9jbGFpbV9yZXF1ZXN0Lmdv) | `100.00% <ø> (ø)` | | | [protocol/xmrtaker/errors.go](https://codecov.io/gh/AthanorLabs/atomic-swap/pull/445?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cHJvdG9jb2wveG1ydGFrZXIvZXJyb3JzLmdv) | `43.47% <46.15%> (+43.47%)` | :arrow_up: | | [protocol/xmrtaker/swap\_state.go](https://codecov.io/gh/AthanorLabs/atomic-swap/pull/445?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cHJvdG9jb2wveG1ydGFrZXIvc3dhcF9zdGF0ZS5nbw==) | `65.37% <50.00%> (-1.22%)` | :arrow_down: | | [protocol/xmrmaker/min\_balance.go](https://codecov.io/gh/AthanorLabs/atomic-swap/pull/445?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cHJvdG9jb2wveG1ybWFrZXIvbWluX2JhbGFuY2UuZ28=) | `72.72% <72.72%> (ø)` | | | [protocol/xmrtaker/net.go](https://codecov.io/gh/AthanorLabs/atomic-swap/pull/445?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cHJvdG9jb2wveG1ydGFrZXIvbmV0Lmdv) | `71.23% <73.68%> (+13.76%)` | :arrow_up: | | [common/types/offer.go](https://codecov.io/gh/AthanorLabs/atomic-swap/pull/445?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-Y29tbW9uL3R5cGVzL29mZmVyLmdv) | `81.66% <76.92%> (-0.58%)` | :arrow_down: | | [protocol/xmrtaker/min\_balance.go](https://codecov.io/gh/AthanorLabs/atomic-swap/pull/445?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cHJvdG9jb2wveG1ydGFrZXIvbWluX2JhbGFuY2UuZ28=) | `85.00% <85.00%> (ø)` | | | [cmd/swapd/main.go](https://codecov.io/gh/AthanorLabs/atomic-swap/pull/445?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-Y21kL3N3YXBkL21haW4uZ28=) | `68.54% <100.00%> (ø)` | | | ... and [5 more](https://codecov.io/gh/AthanorLabs/atomic-swap/pull/445?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | | ... and [9 files with indirect coverage changes](https://codecov.io/gh/AthanorLabs/atomic-swap/pull/445/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.