-
Notifications
You must be signed in to change notification settings - Fork 773
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
Wrong getSenderAddress() when getting v, r, s from Ledger HW #706
Comments
Hi @miohtama, sorry, we are currently under-staffed, seems that no one had time to dig deeper here. Did you find a solution/fix/explanation for the problem in the mean time? Would be helpful for others if you post here. |
I'm having the same issue, |
Is this still an issue with Tx v3? //cc @ryanio |
i'm not sure what the root problem was here, hopefully fixed along many other things with tx v3. i don't have a ledger though, could someone with a ledger try and report back? |
The linked issue was closed. The problem was that the wasn't setting the right v value, and was using EIP115. TBH I'd close this issue. TX used to be very confusing because it used RLP-encoded buffers everywhere, which lead to people reporting signature-related "bugs" all the time. |
@alcuadrado ok, thanks, will close for now, feel free to reopen if issue still persists. |
@alcuadrado This issue persists for me copying the example on the home page nearly verbatim doesn't work: // Signing a 1559 tx
txData = { value: 1 }
tx = FeeMarketEIP1559Transaction.fromTxData(txData, { common })
unsignedTx = tx.getMessageToSign(false)
;({ v, r, s } = await eth.signTransaction(bip32Path, unsignedTx)) // this syntax is: object destructuring - assignment without declaration
txData = { ...txData, v, r, s }
signedTx = FeeMarketEIP1559Transaction.fromTxData(txData, { common })
from = signedTx.getSenderAddress().toString()
console.log(`signedTx: ${signedTx.serialize().toString('hex')}\nfrom: ${from}`) |
Hi,
I need help to understand why
tx.getSenderAddress()
returns different value than what Ledger hw device uses for signing.I am managing to sign a transaction using Ledger. All good, but when the signed transaction comes back from the ledger,
tx.getSenderAddress()
is incorrect. Also, broadcasting the transaction is not possible. I am trying to figure out what goes wrong and I am out of ideas.Ledger device shows a correct address on the screen when signing the transaction, so derivate paths must be correct and it cannot be those.
tx.validate()
goes through, so it is a valid transaction. However, somehow the sender address has mutated along the way.It might be something
chainId
related I need to set manually?The text was updated successfully, but these errors were encountered: