Skip to content

Commit

Permalink
bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Majorfi committed Oct 6, 2023
1 parent 9dbf431 commit fdaa9a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@yearn-finance/web-lib",
"version": "3.0.46",
"version": "3.0.47",
"main": "./dist/index.js",
"types": "./dist/index.d.js",
"files": [
Expand Down
6 changes: 3 additions & 3 deletions src/hooks/useBalances.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ async function getBalances(
** This hook can be used to fetch balance information for any ERC20 tokens.
**************************************************************************/
export function useBalances(props?: TUseBalancesReq): TUseBalancesRes {
const {address: web3Address, isActive, provider} = useWeb3();
const {address: web3Address, isActive} = useWeb3();
const chainID = useChainId();
const {onLoadStart, onLoadDone} = useUI();
const [nonce, set_nonce] = useState(0);
Expand Down Expand Up @@ -241,7 +241,7 @@ export function useBalances(props?: TUseBalancesReq): TUseBalancesRes {
** send in a worker.
**************************************************************************/
const onUpdate = useCallback(async (): Promise<TDict<TBalanceData>> => {
if (!web3Address || !provider) {
if (!web3Address || !isActive) {
return {};
}
const tokenList = deserialize(stringifiedTokens) || [];
Expand Down Expand Up @@ -313,7 +313,7 @@ export function useBalances(props?: TUseBalancesReq): TUseBalancesRes {
}, [
onLoadDone,
onLoadStart,
provider,
isActive,
stringifiedTokens,
web3Address,
chainID
Expand Down

0 comments on commit fdaa9a8

Please sign in to comment.