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

[Bug]: CancelTx removes only one of two logs from self-spend tx #79

Open
phyro opened this issue Jan 19, 2024 · 3 comments
Open

[Bug]: CancelTx removes only one of two logs from self-spend tx #79

phyro opened this issue Jan 19, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@phyro
Copy link
Member

phyro commented Jan 19, 2024


name: Bug report
about: CancelTx removes only one of two logs from self-spend tx

Describe the bug
When we hit Cancel on gui to cancel a transaction, we delete a single log entry when even if the transaction created multiple entries.

NOTE: I tried this with Legacy flow, not contracts.

To Reproduce
Steps to reproduce the behavior:

  1. Make a self-spend tx and notice two new TxLog entries (Send and Receive entry)
  2. Click on Receive entry to expand it
  3. Click Cancel
  4. Observe that this one disappears while the Send is still there

Expected behavior
Ideally, we'd delete both entries. At first I thought that deleting all txlogs that contain the transaction's kernel would be a good idea, but then I remembered that NRD kernels have different transactions with the same kernel which might delete too much if we had these.

Screenshots
/

Desktop (please complete the following information):

  • OS: Linux (Debian)

Additional context
This is might be more of a grin-wallet issue, but since we're reporting gui issues, it's here.

@phyro phyro added the bug Something isn't working label Jan 19, 2024
@phyro
Copy link
Member Author

phyro commented Jan 19, 2024

I just noticed that we have a Shared ID in transaction details that's the same. Perhaps we could use that to delete all txs after doing a cancel. Maybe this should be a part of the cancel rework when we robustly handle transaction cancelling by potentially issuing another tx that double-spends the input.

@yeastplume
Copy link
Member

Yes, it does look like the wallet lib itself is failing to cancel both txs when given a UUID. I'll look into getting that working first

@yeastplume
Copy link
Member

#90 Fix now included

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants