Unusable return value when updating offer
peterMangrove opened this issue · 2 comments
peterMangrove commented
Describe the bug
When updating an existing offer using liqudityProvider.updateAsk
, you only get an ethers.js event. This is not every understable for most people. We should return something more simple + the event, then people with more knowledge can use the event data. But the simple user would also understand that their offer was successfully updated.
To Reproduce
Update an existing offer
let offerIdToUpdate=5573 // use the correct offerId
let lp = await mgv.liquidityProvider(market);
let provisionForUpdateOffer = await lp.computeAskProvision({id: offerIdToUpdate});
let result = await lp.updateAsk( offerIdToUpdate, {
wants: 1000.5,
gives: 1000.4,
fund: provisionForUpdateOffer,
});
Expected behavior
Should return more usable information, so that a newcomer would know that their offer was successfully updated.
peterMangrove commented
When this is done, the how to "Reuse offer" in the SDK, should be updated.
dontrolle commented