Skip to content

Commit

Permalink
chore: removed clg and try catch
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielPrediger committed Jul 1, 2024
1 parent e1c105a commit c8d4dac
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 22 deletions.
2 changes: 0 additions & 2 deletions source/pages/Faucet/Utils/FaucetComponentStates.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export const FaucetComponentStates = () => {
setIsLoading(true);
try {
const data = await claimFaucet(activeNetwork.chainId, account.address);
console.log(data, 'data');
if (!data?.status || !data?.data?.status) {
setStatus('error');
setErrorMessage(
Expand All @@ -70,7 +69,6 @@ export const FaucetComponentStates = () => {
setStatus(`success`);
}
} catch (error) {
console.log(error, 'a');
setStatus('error');
setErrorMessage(errorMessage);
} finally {
Expand Down
34 changes: 14 additions & 20 deletions source/pages/Home/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,26 +162,20 @@ export const Home = () => {
const FaucetModals = useMemo(() => {
const chainId = activeNetwork?.chainId;

try {
if (
!isBitcoinBased &&
chainId &&
Object.values(FaucetChainIds).includes(chainId)
) {
return (
<>
{faucetModal && faucetModal[chainId] ? (
<FaucetFirstAccessModal
handleOnClose={handleOnCloseFaucetModal}
/>
) : (
<FaucetAccessModal />
)}
</>
);
}
} catch (err) {
console.log(err, `err`);
if (
!isBitcoinBased &&
chainId &&
Object.values(FaucetChainIds).includes(chainId)
) {
return (
<>
{faucetModal && faucetModal[chainId] ? (
<FaucetFirstAccessModal handleOnClose={handleOnCloseFaucetModal} />
) : (
<FaucetAccessModal />
)}
</>
);
}
return null;
}, [
Expand Down

0 comments on commit c8d4dac

Please sign in to comment.