The current ERC20 approval flow is not transparent. A new implementation should take into account potential edge cases where ERC20 tokens require a reset of the approved amount when it is not stackable or exceeds the to deposit amount.
A potential flow would be:
if allowance is equal to MAXIMUM_APPROVAL_AMOUNT
deposit
else if allowance is equal to ZERO
approve unlimited
else if allowance is larger than amount to bridge
reset approval to zero
This flow allows the UI to more appropriately react to allowance state changes.
The current ERC20 approval flow is not transparent. A new implementation should take into account potential edge cases where ERC20 tokens require a reset of the approved amount when it is not stackable or exceeds the to deposit amount.
A potential flow would be:
This flow allows the UI to more appropriately react to allowance state changes.