-
Notifications
You must be signed in to change notification settings - Fork 12
A bad close offer fails in the wrong place #17
Comments
Sam to talk to @dckc and/or @Chris-Hibbert about this. |
@samsiegart are you able to reproduce it? |
It seems to fail in the expected way now:
Makes sense since I wanted 5 LINK to close the vault, but I only had 4.9 left after withdrawing 0.1. However, the offer in the wallet API showed a status of "accept", which seems incorrect. I would think it would be "rejected" https://github.com/Agoric/agoric-sdk/blob/master/packages/wallet/api/src/lib-wallet.js#L1118 |
@dckc @michaelfig I tried logging here and looks like the contract is still returning payouts (maybe 0-payments?) https://github.com/Agoric/agoric-sdk/blob/master/packages/wallet/api/src/lib-wallet.js#L630 The wallet uses whether or not there's payouts to mark the offer as accepted or rejected. Should we be checking in the wallet if those payouts are 0, or change the contract to throw instead of returning a payout in this case? |
From Zoe's and the contract's point of view, the request shouldn't throw. Satisfying the user's |
Yes, the purse balances are the same before and after the offer. I don't think |
|
@Chris-Hibbert @michaelfig Does it seem fair to close this in favor of Agoric/agoric-sdk#4360? |
I'm fine with that. |
Keep in mind that one possible outcome is that the user got >= what they wanted and >= what they gave. |
Me too. |
Closing to defer to Agoric/agoric-sdk#4360 as discussed |
@erights You mean ">= what they wanted wanted and <= (as opposed to >=) what they gave" right? |
No. I was pointing out they might get both, and more.
On Fri, Feb 11, 2022 at 8:47 AM Samuel Siegart ***@***.***> wrote:
@erights <https://github.com/erights> You mean ">= what they wanted
wanted and <= (as opposed to >=) what they gave" right?
—
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACC3THWXZM4S5D5DJFYVYDU2U4RZANCNFSM42QEGW2Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Cheers,
--MarkM
|
Repro
The close offer will fail, but it does so trying to get a bogus price quote.
Stack in chain
The text was updated successfully, but these errors were encountered: