diff --git a/common/types.go b/common/types.go index e4cabdd1c0..4c31429a53 100644 --- a/common/types.go +++ b/common/types.go @@ -249,7 +249,9 @@ func (a *Address) Set(other Address) { // MarshalText returns the hex representation of a. func (a Address) MarshalText() ([]byte, error) { - return hexutil.Bytes(a[:]).MarshalText() + // Handle '0x' or 'xdc' prefix here. + // return hexutil.Bytes(a[:]).MarshalText() + return hexutil.Bytes(a[:]).MarshalXDCText() } // UnmarshalText parses a hash in hex syntax.