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

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

Open
oscarwroche opened this issue Jan 16, 2025 · 1 comment

Comments

@oscarwroche
Copy link

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 oscarwroche changed the title Signing typed data with Argent multisig / account with guardians/cosigner Signing typed data with Argent multisig / account with guardians/cosigner causes wallet errors Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@oscarwroche and others