web3.unity icon indicating copy to clipboard operation
web3.unity copied to clipboard

Wrong network when login

Open IsnaniWidhiHidayat opened this issue 1 year ago • 1 comments

Hello, I have code to login in unity using metamask. Login is work, but I set chain-ID to binance testnet (97) and metamask didn't select binance tesnet network.

Debug.Log("Login...");
var projectConfig = ProjectConfigUtilities.Load();
var web3Builder = new Web3Builder(projectConfig).Configure(services =>
{
    services
       .UseUnityEnvironment()
       .UseMultiCall()
       .UseRpcProvider();
#if UNITY_WEBGL && !UNITY_EDITOR
    services.UseMetaMask().UseMetaMaskSigner().UseMetaMaskTransactionExecutor();
#else
    Debug.LogError("Metamask browser connection, currently, only works on WebGL Builds (not in editor).");
#endif
});
var web3 = await web3Builder.LaunchAsync();
if(web3 == null)
{
    Debug.LogError("Login failed");
    return default;
}

IsnaniWidhiHidayat avatar Mar 04 '24 03:03 IsnaniWidhiHidayat

Hi @IsnaniWidhiHidayat, thank you for using our SDK. Currently our Metamask implementation currently only supports Ethereum network but we're working hard on supporting more networks and chains.

rob1997 avatar Apr 08 '24 06:04 rob1997