blockful-io / swaplace-contracts

Swaplace is an open-source, ownerless and feeless token swap protocol
https://app.swaplace.xyz/
MIT License
33 stars 33 forks source link

fix: incorrect event emission on acceptSwap #194

Closed 0xneves closed 6 months ago

0xneves commented 6 months ago

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:

Related code

    emit SwapAccepted(swapId, swap.owner, allowed);
blackbeard002 commented 6 months ago

Hey @0xneves I'm on it

blackbeard002 commented 6 months ago

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