Skip to content

Smart Wallet message verify doesnt work. returns invalid result always #98

@oleggrib

Description

@oleggrib

try this snippet, it return false always when I use Coinbase Smart Wallet and true when I use metamask . Did I do something wrong?

const publicClient = createPublicClient({
		chain: mainnet,
		transport: http()
	});
	// provider = pointer to the wallet provider
	const walletClient = createWalletClient({
		transport: custom(provider)
	});
	// in this step Smart Wallet request user to sign the message
	const signature = await walletClient.signMessage({
		account,
		message: 'hello world'
	});
	const valid = await publicClient.verifyMessage({
		address: account.address,
		message: 'hello world',
		signature
	});
	console.log({ valid });```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions