Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw error when call signMessage method #4374

Closed
1 task done
qiaoqiaoziii opened this issue Nov 3, 2024 · 3 comments
Closed
1 task done

Throw error when call signMessage method #4374

qiaoqiaoziii opened this issue Nov 3, 2024 · 3 comments
Labels
Needs Reproduction Misc: Needs Reproduction

Comments

@qiaoqiaoziii
Copy link

qiaoqiaoziii commented Nov 3, 2024

Check existing issues

Describe the bug

What I am doing:

After connecting to the wallet, I did not close the browser tab page.
Two days later, when I checked the returns from useAccount hook, I found that status returned reconnecting and isConnected returned true, and useConnections hook returned [].
Then I called the signMessage method: signMessage(config, {message}).

What I expected:

The signMessage method can be called normally.

What is actually happening:

I get an error, r.connector.getChainId is not a function

Link to Minimal Reproducible Example

No response

Steps To Reproduce

import { signMessage } from '@wagmi/core';
import { useConfig } from 'wagmi';

const config = useConfig();

const request = async () => {
    const message = 'message';
    const signature = await signMessage(config, { message });
}

What Wagmi package(s) are you using?

wagmi

Wagmi Package(s) Version(s)

2.12.12

Viem Version

2.21.12

TypeScript Version

5.0.4

Anything else?

The connected wallet is okx wallet

@1997roylee
Copy link
Contributor

Could you provide a minimal reproducible, I cant reproduce your issue.

@jxom jxom added the Needs Reproduction Misc: Needs Reproduction label Nov 4, 2024
Copy link
Contributor

github-actions bot commented Nov 4, 2024

Hello @qiaoqiaoziii.

Please provide a minimal reproduction using StackBlitz, TypeScript Playground (for type issues), or a separate minimal GitHub repository.

Minimal reproductions are required as they save us a lot of time reproducing your config/environment and issue, and allow us to help you faster.

Once a minimal reproduction is added, a team member will confirm it works, then re-open the issue.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2024
Copy link
Contributor

This issue has been locked since it has been closed for more than 14 days.

If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Wagmi version. If you have any questions or comments you can create a new discussion thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs Reproduction Misc: Needs Reproduction
Projects
None yet
Development

No branches or pull requests

3 participants