Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: modified different network login handling, fixed deployment url #17

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/app/hooks/use-ethereum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@
if (!address || !network) return;

if (!protocolContract && !dlcManagerContract && !dlcBTCContract) {
setupEthereumConfiguration(network);

Check warning on line 68 in src/app/hooks/use-ethereum.ts

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
}
}, [address, network, protocolContract, dlcManagerContract, dlcBTCContract]);

useEffect(() => {
if (!address || !network || !protocolContract) return;

getAllVaults();

Check warning on line 75 in src/app/hooks/use-ethereum.ts

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
}, [address, network, protocolContract]);

useEffect(() => {
Expand All @@ -88,7 +88,7 @@
}
};

fetchBalance();

Check warning on line 91 in src/app/hooks/use-ethereum.ts

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
}, [
address,
fundedVaults,
Expand Down Expand Up @@ -128,6 +128,7 @@

if (walletNetworkChainID !== network?.id) {
alert(`Please connect to ${network?.name}`);
return;
}
return { walletNetworkChainID, signer };
} catch (error) {
Expand Down Expand Up @@ -214,9 +215,9 @@

const branchName = import.meta.env.VITE_ETHEREUM_DEPLOYMENT_BRANCH;
const contractVersion = import.meta.env.VITE_ETHEREUM_DEPLOYMENT_VERSION;
const deploymentPlanURL = `https://raw.githubusercontent.com/DLC-link/dlc-solidity/${branchName}/deploymentFiles/${network?.name}/v${contractVersion}/${contractName}.json`;
const deploymentPlanURL = `https://raw.githubusercontent.com/DLC-link/dlc-solidity/${branchName}/deploymentFiles/${network?.name.toLowerCase()}/v${contractVersion}/${contractName}.json`;

console.log(

Check warning on line 220 in src/app/hooks/use-ethereum.ts

View workflow job for this annotation

GitHub Actions / lint-eslint

Unexpected console statement
`Fetching deployment info for ${contractName} on ${network?.name} from dlc-solidity/${branchName}`,
);

Expand Down
Loading