Skip to content

Commit

Permalink
Increase bridge qutoe fetching reliability after setting default to s…
Browse files Browse the repository at this point in the history
…elections to undefined
  • Loading branch information
bigboydiamonds committed Oct 6, 2023
1 parent be51adb commit b292e40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/synapse-interface/slices/bridge/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ const {
toTokens,
} = getRoutePossibilities({
fromChainId: ETHEREUM.id,
fromToken: ETH,
toChainId: ARBITRUM.id,
toToken: ETH,
fromToken: null,
toChainId: null,
toToken: null,
})

export const initialState: BridgeState = {
Expand Down
2 changes: 1 addition & 1 deletion packages/synapse-interface/slices/bridge/updater.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default function Updater(): null {
debouncedToTokensFromValue !== initialState.debouncedToTokensFromValue
const userInputIsZero: boolean = hasOnlyZeroes(debouncedFromValue)

if (userInputExists && !userInputIsZero) {
if (!userInputIsZero) {
if (fromChainId && toChainId && fromToken && toToken && synapseSDK) {
const bridgeQuoteRequests: BridgeQuoteRequest[] = toTokens.map(
(token: Token) => {
Expand Down

0 comments on commit b292e40

Please sign in to comment.