Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve usability of refund #1571

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

thenhnn
Copy link

@thenhnn thenhnn commented Mar 6, 2024

User can try to refund even if it is no longer possible. We will show plain text error rather than ugly JSON error, see #674 for more info.

Fixes #683

@thenhnn
Copy link
Author

thenhnn commented Mar 6, 2024

I'm not sure about fn cancel because it does error handling in proper way (as i understand), but logs it to tracing, rather than showing it to user.

@delta1
Copy link
Collaborator

delta1 commented Mar 6, 2024

Please work on an accompanying test, you could use this one as a starting point

https://github.com/comit-network/xmr-btc-swap/blob/master/swap/tests/alice_manually_punishes_after_bob_dead.rs

db.insert_latest_state(swap_id, state.clone().into())
.await?;

println!("{}", refund_error);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please always use tracing for printing logs and add a message for some context.

@thenhnn
Copy link
Author

thenhnn commented May 25, 2024

sorry, can you unassign me? i'm a bit busy and i'm not sure if i can make this.

@thenhnn thenhnn closed this May 25, 2024
@binarybaron binarybaron reopened this May 25, 2024
@binarybaron
Copy link
Collaborator

sorry, can you unassign me? i'm a bit busy and i'm not sure if i can make this.

Sure thing. I'll leave this open as a starting point for someone else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[1.0 XMR] Provide better feedback when cancel/refund transaction publish fails by parsing electrum error
3 participants