You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You would think that the result of .offer() would be the offer result, but... nope! gotcha!
It's a seat, and if you forget to call E(seat).getOfferResult(), exceptions from the offer handler become unhandled rejections.
What is the Problem Being Solved?
You would think that the result of
.offer()
would be the offer result, but... nope! gotcha!It's a seat, and if you forget to call
E(seat).getOfferResult()
, exceptions from the offer handler become unhandled rejections.@LuqiPan got bit by this just as I did when learning the Zoe API:
Agoric/dapp-agoric-basics#8 (comment)
cc @erights @Chris-Hibbert @ivanlei
Description of the Design
One idea is:
Replace
offer2
with the bikeshed color of your choice.But maybe an interim path to the target is a helper:
where
offer2
is...Security Considerations
Not sure, but my intuition says there's more than just unhandled rejections that can result from forgetting to wait for
getOfferResult()
to settle.Scaling Considerations
n/a
Test Plan
Upgrade Considerations
adding the
E(zoe).offer2(...)
API would require a zoe upgrade.The text was updated successfully, but these errors were encountered: