diff --git a/src/App.tsx b/src/App.tsx index 2f9ec1e..142b1b5 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -81,7 +81,7 @@ function App() { const [isAuthenticated, setIsAuthenticated] = useState(false); const [OAuthLoading, setOAuthLoading] = useState(false); const db = useIndexedDBContext(); - const [isUsingGateway, setIsUsingGateway] = useState(true) + const [isUsingGateway, setIsUsingGateway] = useState(null) const [isSocketUp, setIsSocketUp] = useState(false); // const [onGoingTrades, setOngoingTrades] = useState([]) diff --git a/src/components/Grids/TradeOffers.tsx b/src/components/Grids/TradeOffers.tsx index 3e5ccc4..9fb80b1 100644 --- a/src/components/Grids/TradeOffers.tsx +++ b/src/components/Grids/TradeOffers.tsx @@ -468,6 +468,7 @@ export const TradeOffers: React.FC = ({ foreignCoinBalance }: any) => { }; useEffect(() => { + if(isUsingGateway === null) return blockedTradesList.current = JSON.parse( localStorage.getItem("failedTrades") || "[]" ); @@ -489,6 +490,7 @@ export const TradeOffers: React.FC = ({ foreignCoinBalance }: any) => { }, [isUsingGateway]); useEffect(() => { + if(isUsingGateway === null) return if (selectedCoin === null) return; restartTradeOffers(); setTimeout(() => {