@@ -278,15 +278,19 @@ function SuccessCard({ created, onReset, t }: SuccessCardProps) {
278278
279279export default function CreatePaymentForm ( ) {
280280 const t = useTranslations ( "createPaymentForm" ) ;
281- const [ amount , setAmount ] = useState ( "" ) ;
282- const [ asset , setAsset ] = useState < "XLM" | "USDC" > ( "XLM" ) ;
283- const [ recipient , setRecipient ] = useState ( "" ) ;
284- const [ description , setDescription ] = useState ( "" ) ;
281+ const [ amount , setAmount ] = useLocalStorage ( "payment_amount" , "" ) ;
282+ const [ asset , setAsset ] = useLocalStorage < "XLM" | "USDC" > (
283+ "payment_asset" ,
284+ "XLM" ,
285+ ) ;
286+ const [ recipient , setRecipient ] = useLocalStorage ( "payment_recipient" , "" ) ;
287+ const [ description , setDescription ] = useLocalStorage (
288+ "payment_description" ,
289+ "" ,
290+ ) ;
285291 const [ loading , setLoading ] = useState ( false ) ;
286292 const [ error , setError ] = useState < string | null > ( null ) ;
287293 const [ created , setCreated ] = useState < CreatedPayment | null > ( null ) ;
288-
289-
290294 const apiKey = useMerchantApiKey ( ) ;
291295 const hydrated = useMerchantHydrated ( ) ;
292296 const trustedAddresses = useMerchantTrustedAddresses ( ) ;
@@ -302,8 +306,6 @@ export default function CreatePaymentForm() {
302306 "payment_trusted_address" ,
303307 "" ,
304308 ) ;
305-
306-
307309 useHydrateMerchantStore ( ) ;
308310
309311 // ── Rate-limit countdown ──────────────────────────────────
0 commit comments