diff --git a/packages/synapse-interface/pages/state-managed-bridge/index.tsx b/packages/synapse-interface/pages/state-managed-bridge/index.tsx index 488c4cb498..f2b04e8d5a 100644 --- a/packages/synapse-interface/pages/state-managed-bridge/index.tsx +++ b/packages/synapse-interface/pages/state-managed-bridge/index.tsx @@ -1,6 +1,5 @@ import toast from 'react-hot-toast' import { useEffect, useRef, useState } from 'react' -import { commify } from '@ethersproject/units' import { Address, zeroAddress, isAddress } from 'viem' import { polygon } from 'viem/chains' import { useAccount } from 'wagmi' @@ -63,7 +62,7 @@ import { useStaleQuoteUpdater } from '@/utils/hooks/useStaleQuoteUpdater' import { screenAddress } from '@/utils/screenAddress' import { useWalletState } from '@/slices/wallet/hooks' import { useBridgeQuoteState } from '@/slices/bridgeQuote/hooks' -import { resetBridgeQuote, setIsLoading } from '@/slices/bridgeQuote/reducer' +import { resetBridgeQuote } from '@/slices/bridgeQuote/reducer' import { fetchBridgeQuote } from '@/slices/bridgeQuote/thunks' const StateManagedBridge = () => { @@ -123,7 +122,6 @@ const StateManagedBridge = () => { getAndSetBridgeQuote() } else { dispatch(resetBridgeQuote()) - dispatch(setIsLoading(false)) } }, [fromChainId, toChainId, fromToken, toToken, debouncedFromValue]) diff --git a/packages/synapse-interface/slices/bridgeQuote/reducer.ts b/packages/synapse-interface/slices/bridgeQuote/reducer.ts index 5c7575f91a..8407876035 100644 --- a/packages/synapse-interface/slices/bridgeQuote/reducer.ts +++ b/packages/synapse-interface/slices/bridgeQuote/reducer.ts @@ -7,13 +7,11 @@ import { fetchBridgeQuote } from './thunks' export interface BridgeQuoteState { bridgeQuote: BridgeQuote isLoading: boolean - error: any } export const initialState: BridgeQuoteState = { bridgeQuote: EMPTY_BRIDGE_QUOTE, isLoading: false, - error: null, } export const bridgeQuoteSlice = createSlice({ @@ -30,21 +28,17 @@ export const bridgeQuoteSlice = createSlice({ extraReducers: (builder) => { builder .addCase(fetchBridgeQuote.pending, (state) => { - // state.status = FetchState.LOADING state.isLoading = true }) .addCase( fetchBridgeQuote.fulfilled, (state, action: PayloadAction) => { state.bridgeQuote = action.payload - // state.status = FetchState.VALID state.isLoading = false } ) - .addCase(fetchBridgeQuote.rejected, (state, action) => { - // state.error = action.payload + .addCase(fetchBridgeQuote.rejected, (state) => { state.bridgeQuote = EMPTY_BRIDGE_QUOTE - // state.status = FetchState.INVALID state.isLoading = false }) },