Skip to content

Commit

Permalink
fix: encoding to go via common address (checksummed format)
Browse files Browse the repository at this point in the history
  • Loading branch information
roynalnaruto committed Jul 8, 2021
1 parent 21148ed commit 88f80ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chain/ethereum/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ func (addressDecoder) DecodeAddress(encoded address.Address) (address.RawAddress
}

func (addressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) {
encodedAddr := common.Bytes2Hex([]byte(rawAddr))
return address.Address(pack.NewString(encodedAddr)), nil
addr := common.BytesToAddress([]byte(rawAddr))
return address.Address(addr.Hex()), nil
}

// An Address represents a public address on the Ethereum blockchain. It can be
Expand Down

0 comments on commit 88f80ee

Please sign in to comment.