-
-
-
- {truncateAddress(walletAddress)}
-
-
-
-
-
-
{
- setTo(e.target.value);
- setRecipientTouched(true);
- }}
- onBlur={() => setRecipientTouched(true)}
- placeholder="G..."
- className="w-full bg-zinc-800 border border-zinc-700 rounded-lg px-3 py-2.5 text-white text-sm font-mono placeholder-zinc-600 focus:ring-2 focus:ring-zinc-400 focus:outline-none focus:border-zinc-500"
- />
- {recipientTouched && !StrKey.isValidEd25519PublicKey(to.trim()) && (
-
Enter a valid Stellar address
- )}
-
-
-
-
-
- setAmount(e.target.value)}
- placeholder="0.00"
- type="number"
- min="0"
- step="any"
- className="w-full bg-zinc-800 border border-zinc-700 rounded-lg px-3 py-2.5 text-white text-sm placeholder-zinc-600 focus:ring-2 focus:ring-zinc-400 focus:outline-none focus:border-zinc-500"
- />
-
-
-
-
- {(["XLM", "USDC", "EURC"] as const).map((symbol) => {
- const active = token === symbol;
-
- return (
-
- );
- })}
+ {step === "form" ? (
+ <>
+
+
+
+ {truncateAddress(walletAddress)}
+
+
+
+
+
{
+ setTo(e.target.value);
+ setRecipientTouched(true);
+ }}
+ onBlur={() => setRecipientTouched(true)}
+ placeholder="G..."
+ className="w-full bg-zinc-800 border border-zinc-700 rounded-lg px-3 py-2.5 text-white text-sm font-mono placeholder-zinc-600 focus:ring-2 focus:ring-zinc-400 focus:outline-none focus:border-zinc-500"
+ />
+ {recipientTouched && !StrKey.isValidEd25519PublicKey(to.trim()) && (
+
Enter a valid Stellar address
@@ -365,36 +355,177 @@ export function CreateProposalModal({ walletAddress, onClose, onSubmitted, trigg
No estimate yet
)}
-
-
- )}
- {error && (
-
- {error}
-
- )}
+
+
+
+ setAmount(e.target.value)}
+ placeholder="0.00"
+ type="number"
+ min="0"
+ step="any"
+ className="w-full bg-zinc-800 border border-zinc-700 rounded-lg px-3 py-2.5 text-white text-sm placeholder-zinc-600 focus:ring-2 focus:ring-zinc-400 focus:outline-none focus:border-zinc-500"
+ />
+
+
+
+
+ {(["XLM", "USDC", "EURC"] as const).map((symbol) => {
+ const active = token === symbol;
+
+ return (
+
+ );
+ })}
+
+
+
-
-
-
+
+
+ setDescription(e.target.value)}
+ placeholder="What is this payment for?"
+ className="w-full bg-zinc-800 border border-zinc-700 rounded-lg px-3 py-2.5 text-white text-sm placeholder-zinc-600 focus:ring-2 focus:ring-zinc-400 focus:outline-none focus:border-zinc-500"
+ />
+
+
+
+
+ setDeadline(e.target.value)}
+ className="w-full bg-zinc-800 border border-zinc-700 rounded-lg px-3 py-2.5 text-white text-sm focus:ring-2 focus:ring-zinc-400 focus:outline-none focus:border-zinc-500"
+ />
+
+
+ {canCalculateFee && (
+
+
+ {feeLoading ? (
+ Estimating fee…
+ ) : feeError ? (
+ Could not estimate fee
+ ) : feeEstimate !== null ? (
+
+ Estimated fee: ~{feeEstimate.toFixed(7)} XLM
+
+ ) : (
+ No estimate yet
+ )}
+
+
+
+ )}
+
+ {error && (
+
+ {error}
+
+ )}
+
+
+
+
+ >
+ ) : (
+ <>
+
+
Preview Proposal
+
+
+
- Recipient Address
+ -
+ {to.trim()}
+
+
+
+
- Amount
+ -
+ {amount.trim()} {token}
+
+
+
+
- Description
+ -
+ {description.trim()}
+
+
+
+
- Deadline
+ -
+ {formatDeadline(deadline)}
+
+
+
+
+
+ {error && (
+
+ {error}
+
+ )}
+
+
+
+
+
+ >
+ )}