Skip to content

Commit

Permalink
fix: refresh state if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
borcherd committed Feb 11, 2025
1 parent 99feb8c commit bd58005
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,9 @@ export const LendBox = ({
setShouldBeHidden?.(false);
} else if (searchMode && !selectedBank) {
setShouldBeHidden?.(true);
refreshState();
}
}, [searchMode, selectedBank, setShouldBeHidden]);
}, [searchMode, selectedBank, setShouldBeHidden, refreshState]);

const [isTransactionExecuting, setIsTransactionExecuting] = React.useState(false);
const [isSimulating, setIsSimulating] = React.useState<{
Expand Down Expand Up @@ -209,7 +210,6 @@ export const LendBox = ({
}, [refreshState, connected, lendMode]);

React.useEffect(() => {
console.log("refreshState");
return () => {
refreshState();
};
Expand Down

0 comments on commit bd58005

Please sign in to comment.