web3modal
web3modal copied to clipboard
MewConnect options not passed down ( windowClosedError needed )
I have been struggling to investigate an issue regarding options not passed to the MewConnectConnector
As far as my investigation went I can see that here to the MewConnectProvider there are no options passed down
https://github.com/Web3Modal/web3modal/blob/2ff929d0e99df5edf6bb9e88cff338ba6d8a3991/src/providers/connectors/mewconnect.ts#L29
This makes it impossible to pass the follwing options => https://myetherwallet.github.io/MEWconnect-Protocol-Documentation/mewconnect_provider.html#options
I need to pass windowClosedError
in order to get an error when the popup window is closed. Otherwise it won't throw.
There is also an example connector in the repo doing that: https://github.com/MyEtherWallet/MEWconnect-web-client/blob/736bcdddcf09335569cab065be859014c432555b/example/app/src/create.js#L14
Would appreciate it if we can pass down options to MewConnect
This is how I solved passing down pollingInterval
to WalletConnect
import WalletConnectProvider from '@walletconnect/web3-provider'
...
class CustomPollingIntervalWalletConnectProvider extends WalletConnectProvider {
constructor(opts) {
super({ ...opts, pollingInterval: 45000 })
}
}
With stable version 2.0.0 of Web3Modal now released, we are officially dropping support for version 1.x Due to this this issue/pr was marked for closing. It is highly recommended to upgrade as 2.x will be receiving further updates that will enable functionality for some of our newer sdks like auth and push as well as support for WalletConnect v2 (See this post about WalletConnect v1 being deprecated https://medium.com/walletconnect/walletconnect-v1-0-sunset-notice-and-migration-schedule-8af9d3720d2e)
If you need to continue using Web3Modal 1.x and require this feature/fix implemented, we suggest adding it via forking V1 branch.