Impact: Low, depending which tokens will be integrated in backd
Misleading Error message
Summary: misleading error message could potentially confuse developers when debugging code
Details:
On L86 of Preparable.sol, if deadlines[key] is zero then the return message will be Error.DEADLINE_NOT_ZERO, which is the opposite condition of the error (cf. L28 of Preparable.sol for the same error but with the correct context).
Some tokens require the approval to be zero before calling approve with a non-zero value
Summary: some ERC20 tokens require approving to 0 first
Details: Some tokens (such as USDT) do not work when changing the allowance from an existing non-zero allowance value.
Mitigation: In L50 of TopUpAction.sol change the code to
The same pattern should be applied to the following lines mutatis mutandis:
Impact: Low, depending which tokens will be integrated in backd
Misleading Error message
Summary: misleading error message could potentially confuse developers when debugging code
Details:
On L86 of Preparable.sol, if
deadlines[key]
is zero then the return message will beError.DEADLINE_NOT_ZERO
, which is the opposite condition of the error (cf. L28 of Preparable.sol for the same error but with the correct context).The same can be said of L98 of Preparable.sol.
Impact: Code QA
Typos
TODOs left in the code