starknet-react icon indicating copy to clipboard operation
starknet-react copied to clipboard

Signing typed data with Argent multisig / account with guardians/cosigner causes wallet errors

Open oscarwroche opened this issue 11 months ago • 3 comments

I've been trying to sign a message using the useSignTypedData hook but it doesn't seem to work when using an Argent multisig - an error appears in my wallet: FetcherError: An error occurred while fetching

It also doesn't seem to work with an account that has an Argent guardian, and the errors I get in the wallet are:

background.js:67 BaseError: This transaction failed as the cosigner could not provide a valid signature. Please contact support.
    at k3.ge [as cosigner] (background.js:75:126711)
    at async k3.cosignMessage (background.js:35:2471)
    at async k3.signMessage (background.js:35:2676)
    at async kE.signMessage (background.js:35:5537)
    at async Xw (background.js:67:727)
    at async ere.approveAndWait (background.js:71:2681)
    at async background.js:39:45126
    at async y (background.js:42:177)
    at async y (background.js:42:177)
    at async y (background.js:42:177)

and Parameter specified as non-null is null: method com.swmansion.starknet.data.types.Felt$Companion.fromShortString, parameter value

The message I am signing looks like the following (not sure if I should add something to my message):

 {
    title1: title.slice(0, 16),
    title2: title.slice(16),
    account: address,
    uri1: investorAppUrl.slice(0, 16),
    uri2: investorAppUrl.slice(16),
    issuedAt: new Date().toISOString().slice(0, 16),
    types: {
      Validate: [
        { name: 'title1', type: 'string' },
        { name: 'title2', type: 'string' },
        { name: 'account', type: 'string' },
        { name: 'uri1', type: 'string' },
        { name: 'uri2', type: 'string' },
        { name: 'issuedAt', type: 'string' },
      ],
      StarkNetDomain: [
        { name: 'name1', type: 'string' },
        { name: 'name2', type: 'string' },
        { name: 'chainId', type: 'string' },
      ],
    },
    primaryType: 'Validate',
    domain: {
      name1: investorAppUrl.slice(0, 16),
      name2: investorAppUrl.slice(16),
      chainId: getStarknetChain(chainId).id,
    },
  }

oscarwroche avatar Jan 16 '25 17:01 oscarwroche

Does the hook with this data work with other wallets?

fracek avatar Jan 24 '25 11:01 fracek

Let me try this one!

I am first contributor

Vinniharu avatar Mar 21 '25 10:03 Vinniharu

May I handle this issue?

BlessingEmejulu avatar May 13 '25 17:05 BlessingEmejulu

This issue has been automatically marked as stale because it has not had activity in the six months. It will be closed in 2 weeks if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant.

github-actions[bot] avatar Nov 10 '25 03:11 github-actions[bot]

This issue has been automatically closed because it has not had any further activity in the last 14 days.

github-actions[bot] avatar Nov 24 '25 03:11 github-actions[bot]