Skip to content

Commit

Permalink
Lints
Browse files Browse the repository at this point in the history
  • Loading branch information
abtestingalpha committed Aug 13, 2024
1 parent e577fe3 commit d23cb0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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 = () => {
Expand Down Expand Up @@ -123,7 +122,6 @@ const StateManagedBridge = () => {
getAndSetBridgeQuote()
} else {
dispatch(resetBridgeQuote())
dispatch(setIsLoading(false))
}
}, [fromChainId, toChainId, fromToken, toToken, debouncedFromValue])

Expand Down
8 changes: 1 addition & 7 deletions packages/synapse-interface/slices/bridgeQuote/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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<BridgeQuote>) => {
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
})
},
Expand Down

0 comments on commit d23cb0a

Please sign in to comment.