diff --git a/src/swap/components/SwapProvider.tsx b/src/swap/components/SwapProvider.tsx index 8a9df93886f..3abced5beaf 100644 --- a/src/swap/components/SwapProvider.tsx +++ b/src/swap/components/SwapProvider.tsx @@ -49,7 +49,7 @@ export function SwapProvider({ // Core Hooks const config = useConfig(); const [loading, setLoading] = useState(false); - const [error, setError] = useState(); + const [error, setError] = useState(); const [isTransactionPending, setPendingTransaction] = useState(false); const [lifeCycleStatus, setLifeCycleStatus] = useState({ statusName: 'init', @@ -68,7 +68,7 @@ export function SwapProvider({ onError?.(lifeCycleStatus.statusData); } if (lifeCycleStatus.statusName === 'amountChange') { - setError(null); + setError(undefined); } if (lifeCycleStatus.statusName === 'transactionPending') { setLoading(true);