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

fix: incorrect event emission on acceptSwap #194

Closed
0xneves opened this issue Feb 9, 2024 · 2 comments · Fixed by #196
Closed

fix: incorrect event emission on acceptSwap #194

0xneves opened this issue Feb 9, 2024 · 2 comments · Fixed by #196
Assignees
Labels
bug Something isn't working

Comments

@0xneves
Copy link
Contributor

0xneves commented Feb 9, 2024

Bug Report

Current behavior

The event in acceptSwap is logging the allowed variable from the swap struct, which might be the address 0 in case the swap is open to the public, and the user who accepted will not be present in the log - address(0) will be instead - making it impossible to query the swap using his address when connected to the dApp.

Expected behavior

We expect that the acceptSwap emits the msg.sender instead of allowed so we can correctly query the user who accepted the swap.

Definition of Done:

  • Change allowed for msg.sender
  • Correct the tests that will fail subsequently

Related code

    emit SwapAccepted(swapId, swap.owner, allowed);
@0xneves 0xneves added the bug Something isn't working label Feb 9, 2024
@0xneves 0xneves added this to Swaplace Feb 9, 2024
@0xneves 0xneves moved this to 🔖 TODO in Swaplace Feb 9, 2024
@blackbeard002
Copy link
Contributor

Hey @0xneves I'm on it

blackbeard002 added a commit to blackbeard002/swaplace-contracts that referenced this issue Feb 9, 2024
@blackbeard002
Copy link
Contributor

Hey @0xneves made a PR that closes this #196

0xneves added a commit that referenced this issue Feb 9, 2024
 fix: incorrect event emission on acceptSwap #194
@heronlancellot heronlancellot moved this from 🔖 TODO to ✅ Done in Swaplace Feb 13, 2024
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
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants