0

I have a 3 owners multisig that has 2 confirmations as threshhold

I have already one confirmation done programatically, by proposing a transaction using the apiKit.proposeTransaction method. I see this transaction waiting to be confirmed by another owner in order to be executed.

What I want to do is to add a confirmation to that transaction using my Ledger device. From my understanding, what needs to be signed is the safeTxHash that's shown in the UI.

I am using the @ledgerhq/hw-app-eth and @ledgerhq/hw-transport-webhid in order to interact with my Ledger device.

First question I have is:

  1. What needs to be signed is indeed the safeTxHash ?

I think the above is true and I am using the eth.signPersonalMessage() to sign that safeTxHash. However, after the signature is computed (I actually approved the signature from my Ledger device), the derived public address from that signature is not the one from my Ledger. I get the following error after doing this call apiKit.confirmTransaction(safeTxHash, signature);

Error 👇

"signature": [ "Signer=0x___ is not an owner. Current owners=['0xd...', '0xa...', '0x1...']" ]

The derived public address from the signature I sent to the apiKit, is not the one expected.

I believe that the issue needs to be in the signing process... Any ideas on how to do this?

In essence, what I need is to be able to add a confirmation to a multisig transaction using a Ledger device.

Thanks in advance!

1 Answer 1

1

Yes, the safeTxHash is indeed what needs to be signed. However using Personal message signing (eth.signPersonalMessage) is incorrect. This method is typically used for signing personal messages or off-chain data and it prefixes the data before signing, which could cause the mismatch you're seeing.

Instead, you need to use the eth.sign() method, which directly signs the transaction hash without adding any prefix.

2
  • Hi! Thanks for you answer. eth.sign() does not exist in the @ledgerhq/hw-app-eth library. I am facing the issue and have not found a workaround. The public key derived from the signature I am constructing is not the one I am expecting (the one I am actually signing from). Do you have any other ideas?
    – S_C
    Commented Sep 6 at 20:59
  • Have you tried the signEIP712Message()? npmjs.com/package/@ledgerhq/hw-app-eth#signeip712message You can get all the info you need for that from the safe-api
    – jvf
    Commented Sep 9 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.