Non sensible error, when MangroveOrder fails #864
Labels
bug
Something isn't working
LiquidityProvider
Priority 3
Priority 3 on a scale from 1 to 5.
triage
Issue should be triaged
Describe the bug
When running a FoK order using MangroveOrder and giving a price that you know is not high enough for the order to go through, then the error returned is not usable. You either have to take the transaction hash and run it with
cast run <hash>
or do something like this:To Reproduce
Make sure to use a volume and price that makes the order fail.
let result = await market.buy({ volume: 2000, price: 1.00425999, mangroveOrder: { fillOrKill: true }, })
Expected behavior
It should have a usable return value. In this case it should be the revert reason given by take; "mgvOrder/mo/noPartialFill" (Note: the revert reason name may have changed"
Additional context
The issue can maybe be resolved by using this package: https://www.npmjs.com/package/eth-revert-reason
The text was updated successfully, but these errors were encountered: