AthanorLabs / atomic-swap

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

fix: store `newSwap` tx in db, handle pending `newSwap` on restart #470

Closed noot closed 1 year ago

noot commented 1 year ago

closes #443

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 44.94% and project coverage change: -0.16 :warning:

Comparison is base (c5bd052) 58.78% compared to head (06ae7aa) 58.63%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #470 +/- ## ========================================== - Coverage 58.78% 58.63% -0.16% ========================================== Files 128 128 Lines 12185 12409 +224 ========================================== + Hits 7163 7276 +113 - Misses 4278 4362 +84 - Partials 744 771 +27 ``` | [Impacted Files](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/470?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [ethereum/extethclient/eth\_wallet\_client.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/470?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-ZXRoZXJldW0vZXh0ZXRoY2xpZW50L2V0aF93YWxsZXRfY2xpZW50Lmdv) | `55.10% <0.00%> (-3.24%)` | :arrow_down: | | [ethereum/utils.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/470?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-ZXRoZXJldW0vdXRpbHMuZ28=) | `74.51% <ø> (ø)` | | | [protocol/backend/backend.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/470?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cHJvdG9jb2wvYmFja2VuZC9iYWNrZW5kLmdv) | `56.88% <ø> (ø)` | | | [protocol/txsender/external\_sender.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/470?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cHJvdG9jb2wvdHhzZW5kZXIvZXh0ZXJuYWxfc2VuZGVyLmdv) | `0.00% <0.00%> (ø)` | | | [protocol/xmrmaker/swap\_state.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/470?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cHJvdG9jb2wveG1ybWFrZXIvc3dhcF9zdGF0ZS5nbw==) | `68.38% <ø> (ø)` | | | [protocol/xmrtaker/message\_handler.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/470?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cHJvdG9jb2wveG1ydGFrZXIvbWVzc2FnZV9oYW5kbGVyLmdv) | `70.67% <0.00%> (-1.45%)` | :arrow_down: | | [protocol/txsender/sender.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/470?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cHJvdG9jb2wvdHhzZW5kZXIvc2VuZGVyLmdv) | `52.88% <37.50%> (-6.21%)` | :arrow_down: | | [protocol/xmrtaker/instance.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/470?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cHJvdG9jb2wveG1ydGFrZXIvaW5zdGFuY2UuZ28=) | `43.16% <42.77%> (+1.60%)` | :arrow_up: | | [protocol/backend/mock\_recovery\_db.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/470?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cHJvdG9jb2wvYmFja2VuZC9tb2NrX3JlY292ZXJ5X2RiLmdv) | `88.03% <47.05%> (-6.97%)` | :arrow_down: | | [db/recovery\_db.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/470?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-ZGIvcmVjb3ZlcnlfZGIuZ28=) | `66.87% <66.66%> (-0.03%)` | :arrow_down: | | ... and [1 more](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/470?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | | ... and [10 files with indirect coverage changes](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/470/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.