From 4cff224a0c76562132fba5d9b4fb2e538c9797cb Mon Sep 17 00:00:00 2001 From: Shiv Bhonde Date: Thu, 12 Dec 2024 18:44:18 +0530 Subject: [PATCH] mention network name in error message for write --- .../nextjs/hooks/scaffold-eth/useScaffoldWriteContract.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nextjs/hooks/scaffold-eth/useScaffoldWriteContract.ts b/packages/nextjs/hooks/scaffold-eth/useScaffoldWriteContract.ts index 73e33543a..f8454394b 100644 --- a/packages/nextjs/hooks/scaffold-eth/useScaffoldWriteContract.ts +++ b/packages/nextjs/hooks/scaffold-eth/useScaffoldWriteContract.ts @@ -57,7 +57,7 @@ export const useScaffoldWriteContract = ({ } if (accountChain?.id !== selectedNetwork.id) { - notification.error("Your wallet is connected to the wrong network"); + notification.error(`Wallet is connected to the wrong network. Please switch to ${selectedNetwork.name}`); return; } @@ -107,7 +107,7 @@ export const useScaffoldWriteContract = ({ } if (accountChain?.id !== selectedNetwork.id) { - notification.error("Your wallet is connected to the wrong network"); + notification.error(`Wallet is connected to the wrong network. Please switch to ${selectedNetwork.name}`); return; }