tokamak-network / crossTrade

Cross Trade is a new core service for optimistic rollups that complements standard withdrawals and fast withdrawals. It is trustless and do not require extensive backend.
4 stars 1 forks source link

[Non-critical] Rename the function from _approve to _checkAllowance. #32

Closed usgeeus closed 3 months ago

usgeeus commented 3 months ago

Describe the bug The _approve function just checks the allowance.

Lines of Codes https://github.com/tokamak-network/crossTrade/blob/fc11f6e37f93530a65924f8a89f3487fb2e68ea7/contracts/L1/L1CrossTrade.sol#L441

https://github.com/tokamak-network/crossTrade/blob/fc11f6e37f93530a65924f8a89f3487fb2e68ea7/contracts/L2/L2CrossTrade.sol#L331

Configuration

Impact It makes your code less readable.

Recommendation Rename the function from _approve to _checkAllowance. It will improve readability

Exploit Scenario Demo

zzooppii commented 3 months ago

@usgeeus change it check please

usgeeus commented 3 months ago

I think this needs to be solved after solving this issue #38
https://github.com/tokamak-network/crossTrade/issues/38#issue-2372006095

Since it is fixed anyway, I close this issue.