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
Describe the bug
I'm not sure exactly how we provoked this, but I have a note in my local copy of zoeHelpers.js in the escrowAndAllocateTo function, that the tempHandle = offerHandle callback here:
escrowAndAllocateTo: ({ amount, payment, keyword, recipientHandle })=>{// We will create a temporary offer to be able to escrow our payment// with Zoe.lettempHandle;// bug: this is not getting set before use// We need to make an invite and store the offerHandle of that// invite for future use.constcontractSelfInvite=zcf.makeInvitation(offerHandle=>(tempHandle=offerHandle),'self invite',);
did not happen by the time tempHandle got used later:
returnzcf.getZoeService().offer(contractSelfInvite,proposal,payments).then(()=>{// At this point, the temporary offer has the amount from the// payment but nothing else. The recipient offer may have any// allocation, so we can't assume the allocation is currently empty for this// keyword.helpers.trade({offerHandle: tempHandle,gains: {},losses: {Temp: amount},},{offerHandle: recipientHandle,gains: {[keyword]: amount},},);// Complete the temporary offerHandlezcf.complete([tempHandle]);// Now, the temporary offer no longer exists, but the recipient// offer is allocated the value of the payment.});
@dtribble might remember more, we noticed that this waits for offer()'s Promise to fire, but I think we were doing something wrong (maybe something was wrong with our proposal or payments?) and somehow got past that point without the tempHandle being set.
If Dean can't remember what weirdness we did to provoke this, then I'd say we should just have @katelynsills or @Chris-Hibbert eyeball that code briefly to see if there's any obvious assumption being made that isn't justified, and then close this ticket.
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm not sure exactly how we provoked this, but I have a note in my local copy of
zoeHelpers.js
in theescrowAndAllocateTo
function, that thetempHandle = offerHandle
callback here:did not happen by the time
tempHandle
got used later:@dtribble might remember more, we noticed that this waits for
offer()
's Promise to fire, but I think we were doing something wrong (maybe something was wrong with our proposal or payments?) and somehow got past that point without thetempHandle
being set.If Dean can't remember what weirdness we did to provoke this, then I'd say we should just have @katelynsills or @Chris-Hibbert eyeball that code briefly to see if there's any obvious assumption being made that isn't justified, and then close this ticket.
The text was updated successfully, but these errors were encountered: