You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The minimal example. Clicking the button does not show any UI, moreover console.log calls are ignored.
Expected Behavior
await connect() should return control after full initialization of wallet.
In the minimal example, on button click the user should be asked for a signature.
Steps To Reproduce
Clone the minimal example
npm i
npm start
click the button
What package is effected by this issue?
@web3-onboard/react
Is this a build or a runtime issue?
Runtime
Package Version
2.8.13
Node Version
16.16.0
What browsers are you seeing the problem on?
Chrome
Relevant log output
No response
Anything else?
No response
Sanity Check
If this is a build issue, I have included my build config. If this is a runtime issue, I have included reproduction steps and/or a Minimal, Reproducible Example.
The text was updated successfully, but these errors were encountered:
useEffect(()=>{if(!wallet){return;}(async()=>{constprovider=newethers.BrowserProvider(wallet!.provider,'any');console.log('provider',provider);constsigner=awaitprovider.getSigner();console.log('signer',signer);constaddress=awaitsigner.getAddress()console.log('address',address);constmessage="I certify that I am the owner of the Ethereum account\n"+address;constsignature=awaitsigner.signMessage(message);})()},[wallet]);asyncfunctionreadScore(){if(!wallet){awaitconnect();}}
@vporton thanks for posting!
I dont see this when working with our react demo project. We do something similar but not quite the same you can check it out here.
It does not help, because it involves an additional user action to start the next action after connecting, instead of the ability to start an additional blockchain action (such as requesting from user a signature) automatically upon connecting.
BTW, code similar to my above code is buggy: It sometimes produces 4 asks for a signature instead of one.
Current Behavior
It fails to operate with MetaMask (and probably others) wallet directly after connection:
The minimal example. Clicking the button does not show any UI, moreover
console.log
calls are ignored.Expected Behavior
await connect()
should return control after full initialization of wallet.In the minimal example, on button click the user should be asked for a signature.
Steps To Reproduce
npm i
npm start
What package is effected by this issue?
@web3-onboard/react
Is this a build or a runtime issue?
Runtime
Package Version
2.8.13
Node Version
16.16.0
What browsers are you seeing the problem on?
Chrome
Relevant log output
No response
Anything else?
No response
Sanity Check
The text was updated successfully, but these errors were encountered: