@@ -82,6 +82,10 @@ export function SupportPanel({
8282 const [ frequency , setFrequency ] = useState < "weekly" | "monthly" > ( "monthly" ) ;
8383 const [ sending , setSending ] = useState ( false ) ;
8484 const [ txHash , setTxHash ] = useState < string | null > ( null ) ;
85+ // Values captured at submit time so the result modal can keep displaying them
86+ // after the live form fields are cleared (#708).
87+ const [ submittedAmount , setSubmittedAmount ] = useState ( "" ) ;
88+ const [ submittedMessage , setSubmittedMessage ] = useState ( "" ) ;
8589 const { showToast } = useToast ( ) ;
8690
8791 const handleCopy = useCallback ( async ( ) => {
@@ -163,6 +167,13 @@ export function SupportPanel({
163167 ) as Transaction | FeeBumpTransaction ;
164168 const result = await horizonServer . submitTransaction ( tx ) ;
165169 setTxHash ( result . hash ) ;
170+ // Snapshot the submitted values so the result modal keeps showing them,
171+ // then clear the form fields. This prevents the user from accidentally
172+ // re-sending the same amount/message once the modal closes (#708).
173+ setSubmittedAmount ( amount ) ;
174+ setSubmittedMessage ( message ) ;
175+ setAmount ( "" ) ;
176+ setMessage ( "" ) ;
166177
167178 if ( isRecurring && profileId ) {
168179 await apiFetch ( `${ API_BASE_URL } /api/v1/recurring-support` , {
@@ -664,10 +675,10 @@ export function SupportPanel({
664675
665676 < TransactionResultModal
666677 txHash = { txHash }
667- amount = { amount }
678+ amount = { submittedAmount }
668679 assetCode = { paymentAsset . code || "XLM" }
669680 recipientDisplayName = { recipientDisplayName }
670- note = { message || null }
681+ note = { submittedMessage || null }
671682 isOpen = { txHash !== null }
672683 onClose = { ( ) => setTxHash ( null ) }
673684 />
0 commit comments