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

[Bug]: signEIP712Message result error #6065

Open
heisenberg-2077 opened this issue Feb 1, 2024 · 17 comments · Fixed by LedgerHQ/app-ethereum#559
Open

[Bug]: signEIP712Message result error #6065

heisenberg-2077 opened this issue Feb 1, 2024 · 17 comments · Fixed by LedgerHQ/app-ethereum#559
Labels
bug Something isn't working libraries Impacts the Libraries Stale triage In need of triage

Comments

@heisenberg-2077
Copy link

Impacted Library name

@ledgerhq/hw-app-eth

Impacted Library version

6.34.9

Describe the bug

  1. In some cases the signature result does not match the signEIP712HashedMessage
  2. The device reports Invalid data received(0x6a80) when signing withsignEIP712Message in lower versions of hw-app-eth.
 {
  types: {
    BatchSignedERC721Orders: [
      { type: 'address', name: 'maker' },
      { type: 'uint256', name: 'listingTime' },
      { type: 'uint256', name: 'expiryTime' },
      { type: 'uint256', name: 'startNonce' },
      { type: 'address', name: 'erc20Token' },
      { type: 'address', name: 'platformFeeRecipient' },
      { type: 'BasicCollection[]', name: 'basicCollections' },
      { type: 'Collection[]', name: 'collections' },
      { type: 'uint256', name: 'hashNonce' }
    ],
    BasicCollection: [
      { type: 'address', name: 'nftAddress' },
      { type: 'bytes32', name: 'fee' },
      { type: 'bytes32[]', name: 'items' }
    ],
    Collection: [
      { type: 'address', name: 'nftAddress' },
      { type: 'bytes32', name: 'fee' },
      { type: 'OrderItem[]', name: 'items' }
    ],
    OrderItem: [
      { type: 'uint256', name: 'erc20TokenAmount' },
      { type: 'uint256', name: 'nftId' }
    ],
    EIP712Domain: [
      { name: 'name', type: 'string' },
      { name: 'version', type: 'string' },
      { name: 'chainId', type: 'uint256' },
      { name: 'verifyingContract', type: 'address' }
    ]
  },
  domain: {
    name: 'ElementEx',
    version: '1.0.0',
    chainId: '5000',
    verifyingContract: '0x2fa13cf695ec51ded5b8e45ad0bef838ab17e2af'
  },
  primaryType: 'BatchSignedERC721Orders',
  message: {
    maker: '0x6d3b90747dbf5883bf88ff7eb5fcc86f408b5409',
    listingTime: '1706688449',
    expiryTime: '1709280466',
    startNonce: '7',
    erc20Token: '0x09bc4e0d864854c6afb6eb9a9cdf58ac190d0df9',
    platformFeeRecipient: '0x7538262ae993ca117a0e481f908209137a4626e',
    basicCollections: [
      {
        nftAddress: '0xaaaea1fb9f3de3f70e89f37b69ab11b47eb9ce6f',
        fee: '0x000000000000000000c80000000000000000000000000000000000000000000',
        items: [
          '0x000000000000000020c8558000000000000000000000000000000000000005d'
        ]
      }
    ],
    collections: [],
    hashNonce: '0'
  }
};
image

Expected behavior

Using signEIP712Message and signEIP712HashedMessage should result in the same signature.

Additional context

Online demo https://codesandbox.io/p/github/heisenberg-2077/ledger-signEIP712Message

@heisenberg-2077 heisenberg-2077 added bug Something isn't working libraries Impacts the Libraries triage In need of triage labels Feb 1, 2024
Copy link

github-actions bot commented Mar 2, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label, comment, or consider closing it.

@github-actions github-actions bot added the Stale label Mar 2, 2024
@0x398
Copy link

0x398 commented Mar 5, 2024

still waiting for this

Copy link

github-actions bot commented Apr 4, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label, comment, or consider closing it.

@github-actions github-actions bot added the Stale label Apr 4, 2024
@0x398
Copy link

0x398 commented Apr 4, 2024

not stale

@live-github-bot
Copy link
Contributor

@0x398 you are not part of the organization, please contact a maintainer if you need to run this command.

2 similar comments
@live-github-bot
Copy link
Contributor

@0x398 you are not part of the organization, please contact a maintainer if you need to run this command.

@live-github-bot
Copy link
Contributor

@0x398 you are not part of the organization, please contact a maintainer if you need to run this command.

@0x398
Copy link

0x398 commented Apr 4, 2024

it was not a command...

@live-github-bot
Copy link
Contributor

@0x398 you are not part of the organization, please contact a maintainer if you need to run this command.

3 similar comments
@live-github-bot
Copy link
Contributor

@0x398 you are not part of the organization, please contact a maintainer if you need to run this command.

@live-github-bot
Copy link
Contributor

@0x398 you are not part of the organization, please contact a maintainer if you need to run this command.

@live-github-bot
Copy link
Contributor

@0x398 you are not part of the organization, please contact a maintainer if you need to run this command.

apaillier-ledger added a commit to LedgerHQ/app-ethereum that referenced this issue Apr 4, 2024
@github-actions github-actions bot removed the Stale label Apr 5, 2024
@live-github-bot
Copy link
Contributor

@0x398 you are not part of the organization, please contact a maintainer if you need to run this command.

3 similar comments
@live-github-bot
Copy link
Contributor

@0x398 you are not part of the organization, please contact a maintainer if you need to run this command.

@live-github-bot
Copy link
Contributor

@0x398 you are not part of the organization, please contact a maintainer if you need to run this command.

@live-github-bot
Copy link
Contributor

@0x398 you are not part of the organization, please contact a maintainer if you need to run this command.

apaillier-ledger added a commit to LedgerHQ/app-ethereum that referenced this issue Apr 15, 2024
apaillier-ledger added a commit to LedgerHQ/app-ethereum that referenced this issue May 2, 2024
Copy link

github-actions bot commented May 9, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label, comment, or consider closing it.

@github-actions github-actions bot added the Stale label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working libraries Impacts the Libraries Stale triage In need of triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants