fix(tx): fix bug in *TransactionData UnmarshalJSON (#184)

* Fix bug for TransactionData json unmarshal

* clean up

Co-authored-by: HAOYUatHZ <haoyu@protonmail.com>
This commit is contained in:
maskpp 2022-11-21 12:37:53 +08:00 committed by GitHub
parent 22963a115d
commit 0bdd2e0575
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,7 +10,7 @@ import (
type TransactionData struct {
IsCreate bool `json:"isCreate"`
From common.Address `json:"from"`
*Transaction
Transaction
}
// NewTraceTransaction returns a transaction that will serialize to the trace
@ -21,6 +21,6 @@ func NewTraceTransaction(tx *Transaction, blockNumber uint64, config *params.Cha
return &TransactionData{
From: from,
IsCreate: tx.To() == nil,
Transaction: tx,
Transaction: *tx,
}
}