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

EthereumSignedTransaction init always throws rlpItemInvalid #165

Closed
robinwit opened this issue Jun 30, 2023 · 0 comments · Fixed by #170
Closed

EthereumSignedTransaction init always throws rlpItemInvalid #165

robinwit opened this issue Jun 30, 2023 · 0 comments · Fixed by #170

Comments

@robinwit
Copy link

Hi,

I'm trying to read an existing signed transaction in RLP format with Web3.swift:

let rlpBytes = Array(rlpData.bytes[1...]) // drop prefix
let rlpItems = try! RLPDecoder().decode(rlpBytes)
let tx = try! EthereumSignedTransaction(rlp: rlpItems)

The init of EthereumSignedTransaction runs fine, all the fields are properly extracted, but then line 583 is hit, which simply just seems to throw an error, always?

Shouldn't this be an else? I can open a PR to fix it.
Is this intended behavior in some way or am I misinterpreting the API?

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

Successfully merging a pull request may close this issue.

1 participant