Summary
DeployButton.tsx catches errors from deployContract() and sets status = 'error', which changes the button label to "Failed — Retry". But the actual error message is swallowed by the empty catch block and never shown to the user. The user has no idea what went wrong.
Problem
The catch block in DeployButton.tsx is:
} catch {
setStatus("error")
}
This discards all error details. Common failure modes that need clear messaging include:
- Freighter not installed
- User rejected the wallet connection in Freighter
- Insufficient XLM balance on Testnet
- Network / RPC timeout
- Transaction submission failure (e.g. sequence number mismatch)
Expected Behaviour
- When deployment fails, a descriptive error message is displayed (in a toast, modal, or inline below the button).
- The raw error is logged to the console for debugging.
- Where possible, actionable guidance is given ("Fund your Testnet account at https://laboratory.stellar.org/").
Acceptance Criteria
References
src/components/editor/DeployButton.tsx lines 16–20
src/lib/stellar/deploy.ts
Summary
DeployButton.tsxcatches errors fromdeployContract()and setsstatus = 'error', which changes the button label to "Failed — Retry". But the actual error message is swallowed by the emptycatchblock and never shown to the user. The user has no idea what went wrong.Problem
The catch block in
DeployButton.tsxis:This discards all error details. Common failure modes that need clear messaging include:
Expected Behaviour
Acceptance Criteria
catchblock captures the error object:catch (err).errorMessagestate variable stores a user-facing string derived from the error."Deployment failed. Check the console for details."console.error.References
src/components/editor/DeployButton.tsxlines 16–20src/lib/stellar/deploy.ts