Skip to content

Verify and accept a quote.

An exact source excerpt. Inspect the complete file to see its imports, surrounding types, and error handling.

domain/probes/bookingquote/model/apps/booking_quote/src/main.tsxExcerpt begins at line 82File SHA-2560d7908fe53c4154d6243a09e848dfbe95b3d719421468d2e59b095c2f76145ca
Verify and accept a quote tsx
  async function acceptCurrentQuote() {    if (local === null || isAcceptanceInFlight.current) return;    isAcceptanceInFlight.current = true;    setIsAccepting(true);    const revision = inputRevision.current;    const input = {      request_id: requestId, unit_price_minor: BigInt(unitPrice), units: BigInt(units),      discount_bps: BigInt(discount), tax_bps: BigInt(tax),    };    try {      setOperationError(null);      const plan = await acceptBookingQuote.plan(client, input, { targetKey: requestId });      if (inputRevision.current !== revision) return;      await acceptBookingQuote.execute(client, plan, { planHash: plan.hash });      if (inputRevision.current !== revision) return;      setAccepted(true);    } catch (cause) {      if (inputRevision.current !== revision) return;
Run it in its product environment.

This source depends on its surrounding product, generated libraries, and platform runtime. The website demonstrations run locally in your browser and do not execute this source against a workspace.