WalletConnect / web3modal

A single Web3 provider solution for all Wallets
https://web3modal.com
Apache License 2.0
4.67k stars 1.28k forks source link

[feature request] Customize all WalletConnect options while initialize `createModal` #2172

Open yulafezmesi opened 3 weeks ago

yulafezmesi commented 3 weeks ago

What problem does this new feature solve?

as far as i can see, currently not possible to pass optionalMethods and all other optiona to initialize walletconnect eth. provider. can we make this possible?

https://github.com/WalletConnect/web3modal/blob/V4/packages/ethers5/src/client.ts#L383

Describe the solution you'd like

create a new contractor object named like ethereumProviderOptions, and pass into walletconnect eth. provider.

private ethereumProviderOptions: EthereumProviderOptions | undefined = undefined

linear[bot] commented 3 weeks ago

W3M-260 [feature request] Customize all WalletConnect options while initialize `createModal`

glitch-txs commented 3 weeks ago

Is there any particular method you'd like to add? We add all the Ethereum methods by default

yulafezmesi commented 3 weeks ago

we have special integration with Avocado Wallet and Avocado handling custom methods like avocado_getOwner or avocado_sendTransaction. this was possible with legacy Web3Modal, but currently is not possible. (we're migrating to v4)

edit: if i don't pass the optional method names, throwing method not found err

image

glitch-txs commented 3 weeks ago

Ahh this is only supported when used with Wagmi atm

yulafezmesi commented 3 weeks ago

i see. can be possible for ethers5 as well? i'm willing to created PR if sounds good you.

glitch-txs commented 3 weeks ago

we will refactor the connectors logic, once that's done we can add it I think.

cc @svenvoskamp