Skip to content

Commit

Permalink
error
Browse files Browse the repository at this point in the history
  • Loading branch information
Zizzamia committed Aug 23, 2024
1 parent 91af67f commit 9b76ef8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/swap/components/SwapProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function SwapProvider({
// Core Hooks
const config = useConfig();
const [loading, setLoading] = useState(false);
const [error, setError] = useState<SwapError | null>();
const [error, setError] = useState<SwapError>();
const [isTransactionPending, setPendingTransaction] = useState(false);
const [lifeCycleStatus, setLifeCycleStatus] = useState<LifeCycleStatus>({
statusName: 'init',
Expand All @@ -68,7 +68,7 @@ export function SwapProvider({
onError?.(lifeCycleStatus.statusData);
}
if (lifeCycleStatus.statusName === 'amountChange') {
setError(null);
setError(undefined);
}
if (lifeCycleStatus.statusName === 'transactionPending') {
setLoading(true);
Expand Down

0 comments on commit 9b76ef8

Please sign in to comment.