Skip to content

Commit

Permalink
removed yarn chain error from user view
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobHomanics committed May 13, 2024
1 parent 22ccbb3 commit 097dbe1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
2 changes: 0 additions & 2 deletions packages/nextjs/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ const Home: NextPage = () => {

const [selectedDropdownOption, setSelectedDropdownOption] = useState(defaultOption);

console.log(selectedDropdownOption);

async function onSubmit(e: any) {
e.preventDefault();

Expand Down
30 changes: 17 additions & 13 deletions packages/nextjs/components/scaffold-eth/Faucet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { useAccount } from "wagmi";
import { BanknotesIcon } from "@heroicons/react/24/outline";
import { Address, AddressInput, Balance, EtherInput } from "~~/components/scaffold-eth";
import { useTransactor } from "~~/hooks/scaffold-eth";
import { notification } from "~~/utils/scaffold-eth";

// import { notification } from "~~/utils/scaffold-eth";

// Account index to use from generated hardhat accounts.
const FAUCET_ACCOUNT_INDEX = 0;
Expand Down Expand Up @@ -36,19 +37,22 @@ export const Faucet = () => {
const accounts = await localWalletClient.getAddresses();
setFaucetAddress(accounts[FAUCET_ACCOUNT_INDEX]);
} catch (error) {
notification.error(
<>
<p className="font-bold mt-0 mb-1">Cannot connect to local provider</p>
<p className="m-0">
- Did you forget to run <code className="italic bg-base-300 text-base font-bold">yarn chain</code> ?
</p>
<p className="mt-1 break-normal">
- Or you can change <code className="italic bg-base-300 text-base font-bold">targetNetwork</code> in{" "}
<code className="italic bg-base-300 text-base font-bold">scaffold.config.ts</code>
</p>
</>,
console.warn(
"Ladders.Vision/Scaffold-NFT: If running on your localhost, then you may need to run `yarn chain` if you are trying to access the testing grounds.",
);
console.error("⚡️ ~ file: Faucet.tsx:getFaucetAddress ~ error", error);
// notification.error(
// <>
// <p className="font-bold mt-0 mb-1">Cannot connect to local provider</p>
// <p className="m-0">
// - Did you forget to run <code className="italic bg-base-300 text-base font-bold">yarn chain</code> ?
// </p>
// <p className="mt-1 break-normal">
// - Or you can change <code className="italic bg-base-300 text-base font-bold">targetNetwork</code> in{" "}
// <code className="italic bg-base-300 text-base font-bold">scaffold.config.ts</code>
// </p>
// </>,
// );
// console.error("⚡️ ~ file: Faucet.tsx:getFaucetAddress ~ error", error);
}
};
getFaucetAddress();
Expand Down

0 comments on commit 097dbe1

Please sign in to comment.