Skip to content

Commit

Permalink
Merge pull request #20 from DLC-link/feat/modified-setup
Browse files Browse the repository at this point in the history
feat: modified setup conditions
  • Loading branch information
Polybius93 authored Dec 1, 2023
2 parents e679623 + e6329f4 commit 5937510
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/components/my-vaults-small/my-vaults-small.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function MyVaultsSmall({
} = useVaults();

useEffect(() => {
if (network && ethereum?.isLoaded) {
if (address && network && ethereum?.isLoaded) {
const fetchAddressData = async () => {
await ethereum?.getAllVaults();
await ethereum?.getDLCBTCBalance();
Expand All @@ -42,7 +42,7 @@ export function MyVaultsSmall({
};
fetchAddressData();

Check warning on line 43 in src/app/components/my-vaults-small/my-vaults-small.tsx

View workflow job for this annotation

GitHub Actions / lint-eslint

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator
}
}, [network, ethereum?.isLoaded]);
}, [address, network, ethereum?.isLoaded]);

Check warning on line 45 in src/app/components/my-vaults-small/my-vaults-small.tsx

View workflow job for this annotation

GitHub Actions / lint-eslint

React Hook useEffect has a missing dependency: 'ethereum'. Either include it or remove the dependency array

return (
<MyVaultsSmallLayout>
Expand Down
2 changes: 2 additions & 0 deletions src/app/hooks/use-ethereum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ export function useEthereum(): UseEthereumReturnType {
network,
};

setIsLoaded(false);
await setupEthereumConfiguration(network);
setIsLoaded(true);

store.dispatch(accountActions.login(accountInformation));
} catch (error) {
Expand Down

0 comments on commit 5937510

Please sign in to comment.