Skip to content

Commit def66b2

Browse files
committed
Update
1 parent 63804b1 commit def66b2

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • Samples/AppKit Sample/Assets/Scripts

Samples/AppKit Sample/Assets/Scripts/Dapp.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,12 @@ public async void OnSignTypedDataV4Button()
263263

264264
public async void OnReadContractClicked()
265265
{
266+
if (Web3Modal.NetworkController.ActiveChain.ChainId != "1")
267+
{
268+
Notification.ShowMessage("Please switch to Ethereum mainnet.");
269+
return;
270+
}
271+
266272
const string contractAddress = "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb"; // on Ethereum mainnet
267273
const string yugaLabsAddress = "0xA858DDc0445d8131daC4d1DE01f834ffcbA52Ef1";
268274
const string abi = CryptoPunksAbi;

0 commit comments

Comments
 (0)