Minds / web3modal-angular

MIT License
16 stars 8 forks source link

Angular 12 Web3ModalService Instantiation providerOptions/disableInjectedProvider #2

Open johnstoia opened 2 years ago

johnstoia commented 2 years ago

Hi guys,

Thanks for this package, I've been looking for one everywhere.

When trying to instantiate the service the way laid out in your readme I get this error

image

I tried adding in the disableInjectedProvider field with 'false' but it seems providerOptions still needs some sort of value to be instantiated.

image

Is this an angular12 issue? How do I fix this?

Apologies if this question is easy, it's my first time working with Web3Modal

Thanks

timlehane commented 2 years ago

I'm also having this issue - any fix @johnstoia ?

ciri commented 2 years ago

You need to specify it, just like in https://github.com/Web3Modal/web3modal.

E.g. put this somewhere after your imports in the module file:

const providerOptions = {
  injected: {
    display: {
      name: "Browser Wallet",
      description: "Connect with your browser wallet."
    },
    package: null
  }
};