v3-periphery icon indicating copy to clipboard operation
v3-periphery copied to clipboard

Consider returning the original revert message with TransferHelper

Open alcueca opened this issue 4 years ago • 2 comments

TransferHelper overwrites the revert message, which makes it impossible to know whether the transaction failed because of insufficient balance, insufficient approval, or something else.

The code to return the revert message is here.

This issue applies as well to TransferHelper in the core repo.

alcueca avatar Mar 26 '21 14:03 alcueca

True, but also no transaction should be constructed and submitted to the chain s.t. the allowance is insufficient or the balance is insufficient, so the revert reason isn't particularly helpful for users.

I'd consider this low priority, definitely won't change in core

moodysalem avatar Mar 26 '21 18:03 moodysalem

Yeah, with the testing and the audits done it's probably too late to fix this. Maybe it will come useful in v4.

alcueca avatar Mar 26 '21 20:03 alcueca