Skip to content

Conversation

@nicholaspai
Copy link
Member

@nicholaspai nicholaspai commented Apr 17, 2023

When sped up, updated message and recipient are not used

When sped up, updated message and recipient are not used
@mrice32 mrice32 self-requested a review April 17, 2023 21:33
Copy link
Contributor

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

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

Very nice find!

Copy link
Contributor

@james-a-morris james-a-morris left a comment

Choose a reason for hiding this comment

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

Left a comment

Comment on lines +1226 to 1240
_unwrapwrappedNativeTokenTo(payable(relayExecution.updatedRecipient), amountToSend);
// Else, this is a normal ERC20 token. Send to recipient.
} else {
// Note: Similar to note above, send token directly from the contract to the user in the slow relay case.
if (!relayExecution.slowFill)
IERC20Upgradeable(relayData.destinationToken).safeTransferFrom(
msg.sender,
relayData.recipient,
relayExecution.updatedRecipient,
amountToSend
);
else
IERC20Upgradeable(relayData.destinationToken).safeTransfer(
relayExecution.updatedRecipient,
amountToSend
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: should we add the tsconfig setting to require brackets after conditionals?

Copy link
Member Author

Choose a reason for hiding this comment

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

do you know which config we should set for that? I marginally favor requiring brackets but not a big deal

@nicholaspai nicholaspai merged commit 19d3c5a into master Apr 21, 2023
@nicholaspai nicholaspai deleted the fix/message branch April 21, 2023 13:57
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.

4 participants