fcl-js icon indicating copy to clipboard operation
fcl-js copied to clipboard

[FEATURE] Receive a user's address when wallet is asked to sign arbitrary message

Open cybercent opened this issue 2 years ago • 1 comments

Issue to be solved

I'm looking for a way to determine the wallet address that is expected to sign the message.

Suggest A Solution

In the demo below, an ADDRESS param would be expected along with MSG.

import * as fcl from "@onflow/fcl"

const signMessage = async () => {
  const MSG = Buffer.from("FOO").toString("hex")
  try {
    return await fcl.currentUser.signUserMessage(MSG)
  } catch (error) {
    console.log(error)
  }
}

What are you currently working on that this is blocking?

In the context of a multi account wallet, I'm looking for a way to know what account does the app expect the user to sign a message with.

cybercent avatar Oct 10 '23 10:10 cybercent