Open
Description
What is the Problem Being Solved?
The makeOffer
function in walletConnection.ts
doesn't share the offer result, it only reports error, accepted, or refunded. Apps might want to access the offer result after making an offer, and right now they'd have to manually watch updates in vstorage to see them.
Description of the Design
Add a case for update.status.result !== undefined
in watchUpdates, it could do something like:
onStatusChange({ status: 'result', data: update.status.result });
One consideration to figure out is when to stop watching for updates. Does every offer return a result or an error? Is a result guaranteed to be returned before or after numWantsSatisfied
?
Test Plan
Probably testing by linking the package locally with dapp-offer-up would be the most straighforward.