Nethereum.Unity.Webgl icon indicating copy to clipboard operation
Nethereum.Unity.Webgl copied to clipboard

Typo in NethereumMetamask.jslib

Open fukaraadam opened this issue 2 years ago • 0 comments

I think there is a little typo in NethereumMetamask.jslib which causes to empty public key when accounts changed. `

    ethereum.on("accountsChanged",
            function (accounts) {
                //console.log(accounts[0]);
                let account = "";
                if(account[0] !== undefined){
                    account = account[0];
                }
                nethereumUnityInstance.SendMessage(parsedObjectName, parsedCallbackAccountChange, account);
            });
    ethereum.on("chainChanged",
            function (chainId) {
                // console.log(chainId);
                nethereumUnityInstance.SendMessage(parsedObjectName, parsedCallbackChainChange, chainId.toString());
            });

`

in ethereum.on("accountsChanged, ...) accounts array typed as "account" (without 's')

fukaraadam avatar Jan 17 '23 04:01 fukaraadam