Metamask is connected but signer is absent
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
Package Version
0.0.3
Current Behavior
I’m developing primarily against Metamask, and I’ve noticed that if I return to the project after a day or so (maybe I reset my computer), I find my project in a state where account
is present, but signer
is null.
For example, in this state, this code…
const Wallet = () => {
const { data: account } = useAccount();
const { data: signer } = useSigner();
console.log('account', account);
console.log('signer', signer);
Will produce these logs:
I have noticed that this case is when Metamask is re-prompting for password:
Expected Behavior
I’m under the impression that account and signer should both be present, or both absent; but never partially. (This may be a misunderstanding on my part).
Steps To Reproduce
I’m pretty sure that restarting MacOS will require that Metamask wants you to reconfirm your password.
Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)
No response
Anything else?
It’s most likely that this is expected behavior, given that it seems to be related to Metamask’s internals. But my question for this library is – how do you practically help a user recover from this state? What’s wagmi’s expected UX here for this case?
THANK YOU SO MUCH FOR THIS LIBRARY IT IS FANTASTIC
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:10 (4 by maintainers)
Top GitHub Comments
very soon! been delayed with some other work this week.
Thank you @tmm - will check back when a new release is cut to validate it’s working as expected.