Skip to content

Commit

Permalink
Update tokens dependency for effect
Browse files Browse the repository at this point in the history
  • Loading branch information
wachunei committed Nov 17, 2020
1 parent 1662700 commit 24b5456
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/components/UI/Swaps/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,11 @@ function SwapsAmountView({ tokens, accounts, selectedAddress, balances }) {
} catch (err) {
console.error(err);
} finally {
setLoadingTokens(() => false);
setInitialLoadingTokens(() => false);
setLoadingTokens(false);
setInitialLoadingTokens(false);
}
})();
// TODO(wachunei) include tokens in deps once controller is updated with cache timestamp
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
}, [tokens]);

useEffect(() => {
if (initialSource && tokens && !sourceToken) {
Expand Down

0 comments on commit 24b5456

Please sign in to comment.