fcl-js
fcl-js copied to clipboard
[FEATURE] tx should include revertMessage besides errorMessage
Issue to be solved
Currently tx object includes errorMessage, which is a bunch of text like this:
But FCL is tend to end-users, developers have debugged and tested this on Flow CLI already.
assert
or pre
and post
message is born to announce to users briefly about the error they are getting, not related to anything behind the code.
So this is totally unneccessary and it is also very inconvenient and hard to trim the errorMessage
just to get the revert message for users.
Suggest A Solution
Actually the replace option is good enough because we can get it in console.error()
already.
What are you currently working on that this is blocking?
When buidling front-end for MamaExchange which is a huge Concentrated Liquidity DEX, that's why it has a lot of error codes/messages we have handled.
Because FCL does not support revertMessage
, it is inconvenient in many ways.