Código da operação: {operationId}
Você recebe um Stock Token, não a ação. O custo total aparece antes do Pix.
} ); diff --git a/apps/stocks/src/flows/SellFlow.jsx b/apps/stocks/src/flows/SellFlow.jsx index a8e2c31ba..417873f35 100644 --- a/apps/stocks/src/flows/SellFlow.jsx +++ b/apps/stocks/src/flows/SellFlow.jsx @@ -1,5 +1,5 @@ // Sell flow: Gold's SellFlow over the ramp adapter. -// amount (tokens + Pix key) -> (code) -> prepare: availability, wallet on Robinhood Chain, balance +// (method: Pix, or leave for the USDC checkout) -> amount (tokens + Pix key) -> (code) -> prepare: availability, wallet on Robinhood Chain, balance // and ETH, quote, price guard, readiness -> (kyc) -> review -> register + sign -> start -> processing // sign (resume): resumeSell -> start; processing -> success | issue import { useEffect, useRef, useState } from "react"; @@ -18,10 +18,10 @@ import { checkQuotePrice } from "../lib/price-guard.js"; import { freshPauseReason } from "../lib/ramp-contract.js"; import { quoteNeedsRefresh, stepAfterCode, validSellAmount } from "../lib/purchase-options.js"; import { formatTokenAmount, formatTokensPt, maxSellAmount, tokensToWei } from "../lib/token.js"; -import { FlowIssue, FlowProgress, GuardCard, KYC_IN_REVIEW_PT, KycStep, OtpStep, POLL_RESTART_MS, ProcessingSteps, QuoteTimer, StepIntro, SuccessSeal, TokenSummary, Waiting, errorMessage, needsCode, unavailableMessage } from "./parts.jsx"; +import { FlowIssue, FlowProgress, GuardCard, KYC_IN_REVIEW_PT, KycStep, MethodStep, OtpStep, POLL_RESTART_MS, ProcessingSteps, QuoteTimer, StepIntro, SuccessSeal, TokenSummary, Waiting, errorMessage, needsCode, unavailableMessage } from "./parts.jsx"; const PROGRESS = ["Quantidade", "Segurança", "Revisão", "Confirmação"]; -const PROGRESS_INDEX = { amount: 0, otp: 1, kyc: 1, review: 2, sign: 3 }; +const PROGRESS_INDEX = { method: 0, amount: 0, otp: 1, kyc: 1, review: 2, sign: 3 }; const toInput = (decimal) => String(decimal).replace(".", ","); @@ -41,7 +41,7 @@ function WalletAddress({ address }) { ); } -function AmountStep({ token, price, raw, amount, setAmount, pixKey, setPixKey, onNext, busy, error, onSellUsdc }) { +function AmountStep({ token, price, raw, amount, setAmount, pixKey, setPixKey, onNext, busy, error }) { const valid = validSellAmount(amount, raw) && pixKey.trim().length >= 5; let estimate = null; try { estimate = price?.brl && tokensToWei(amount) > 0n ? Number(String(amount).replace(",", ".")) * price.brl : null; } catch { estimate = null; } @@ -50,7 +50,6 @@ function AmountStep({ token, price, raw, amount, setAmount, pixKey, setPixKey, o return (Código da operação: {operationId}