AthanorLabs / atomic-swap

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

fix: handle "insufficient funds" error on claim #461

Closed noot closed 1 year ago

noot commented 1 year ago

for some reason, although I had more than enough funds to claim, I still got an insufficient funds error. this PR updates the code to handle that case, and use a relayer if we're out of funds

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 56.25% and project coverage change: -0.02 :warning:

Comparison is base (1d8dff5) 58.59% compared to head (b8fff85) 58.57%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #461 +/- ## ========================================== - Coverage 58.59% 58.57% -0.02% ========================================== Files 124 124 Lines 11654 11668 +14 ========================================== + Hits 6829 6835 +6 - Misses 4103 4109 +6 - Partials 722 724 +2 ``` | [Impacted Files](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/461?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [protocol/xmrmaker/claim.go](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/461?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cHJvdG9jb2wveG1ybWFrZXIvY2xhaW0uZ28=) | `60.81% <56.25%> (-0.73%)` | :arrow_down: | ... and [7 files with indirect coverage changes](https://app.codecov.io/gh/AthanorLabs/atomic-swap/pull/461/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.