This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes bug in fetching future-nonce transactions.
Before a transaction is mined, its
value
anddata
(akainput
) fields could possibly beundefined
. Once the transaction is mined (which, in most cases is immediately), the transaction data is serialized and thoseundefined
values are converted to0x
, which is the desired value for both thevalue
anddata
when the fields are omitted by the user.If a transaction is sent with a future nonce, however, it isn't immediately mined. If that transaction is retrieved via
eth_getTransactionByHash
, it has not yet been serialized. As such those two fields areundefined
and completely missing from the resulting transaction object. Now, we give default values of0
forvalue
and0x
fordata
when those fields are missing from a transaction.