Merge pull request #2 from XinFinOrg/apothem

Handle '0x' or 'xdc' prefix
This commit is contained in:
olumuyiwadad 2021-09-27 12:30:57 +05:30 committed by GitHub
commit 75b2f3ca9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.