etherspot / etherspot-prime-sdk

Etherspot Prime - Account Abstraction SDK
https://etherspot.fyi
MIT License
120 stars 22 forks source link

Factual wallet address is not being created when using MetaMaskWalletProvider #66

Closed Shivamycodee closed 10 months ago

Shivamycodee commented 10 months ago

It was working fine till yesterday , now it's showing error:

code:

here you can see i have simply used MetaMaskWalletProvider to create an instance of primeSdk,

  if (!MetaMaskWalletProvider.detect()) {
      toast("Metamask not detected");
      return;
    }

    const walletProvider = await MetaMaskWalletProvider.connect();

    console.log("walletProvider: ",walletProvider)

    const _primeSdk = new PrimeSdk(walletProvider, {
      chainId: 80001,
    });

     console.log(_primeSdk);

    const _addresss = await _primeSdk.getCounterFactualAddress();

The walletProvider was consoled with the wallet i wanted to connect to without any issue, but when i console.log _primeSdk i got:

image

here you can see the accountAddress in etherspotWallet is undefined.

here is my walletProvider:

image

Shivamycodee commented 10 months ago

It's working now that i have installed the latest version.