[ ] Additional booking options that can be added to the deal are placed in the Bid options (items and terms).
[ ] It is required to build a list with checkboxes based on the 1) optins.items 2) options.terms
[ ] If user will select one of those checkboxes associated items must be passed to the deal function.
[ ] Each option will increase the total price
Booking process should follow these steps:
[ ] Validation of the facility metadata (signature validation)
[ ] Validation of the bid (signature validation)
[ ] Sending of deal transaction (value must be set to bid price)
[ ] Waiting for tx hash
[ ] Fetching of the stub from the Stays contract
[ ] Saving of the stub to the local storage
[ ] Subscription (polling) for events from Stays on confirmed or declined
Waiting for tx mined
Waiting for confirmed or declined event after tx confirmation with checking for the deal status.
Updating the stub state in the local storage
Show booking result message to the user
Preparing booking options:
deal
are placed in theBid
options (items
andterms
).deal
function.Booking process should follow these steps:
bid
(signature validation)deal
transaction (value must be set tobid
price)stub
from theStays
contractstub
to the local storageStays
onconfirmed
ordeclined
Waiting for tx mined Waiting forconfirmed
ordeclined
event after tx confirmation with checking for thedeal
status. Updating thestub
state in the local storage Show booking result message to the user