diff --git a/common/types.go b/common/types.go index dc1e1d6713..7e0b5f2587 100644 --- a/common/types.go +++ b/common/types.go @@ -242,7 +242,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.