Skip to content

Commit

Permalink
Merge branch 'feat/migrate-to-new-api'
Browse files Browse the repository at this point in the history
  • Loading branch information
loongy committed Aug 21, 2020
2 parents 7bbdebf + 3a35112 commit 96e09ae
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions api/address/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ type Decoder interface {
DecodeAddress(Address) (RawAddress, error)
}

// The EncoderDecoder interfaces combines encoding and decoding functionality
// The EncodeDecoder interfaces combines encoding and decoding functionality
// into one interface.
type EncoderDecoder interface {
type EncodeDecoder interface {
Encoder
Decoder
}
6 changes: 3 additions & 3 deletions chain/bitcoin/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import (
"github.com/renproject/pack"
)

type AddressEncoderDecoder struct {
type AddressEncodeDecoder struct {
AddressEncoder
AddressDecoder
}

func NewAddressEncoderDecoder(params *chaincfg.Params) AddressEncoderDecoder {
return AddressEncoderDecoder{
func NewAddressEncodeDecoder(params *chaincfg.Params) AddressEncodeDecoder {
return AddressEncodeDecoder{
AddressEncoder: NewAddressEncoder(params),
AddressDecoder: NewAddressDecoder(params),
}
Expand Down
6 changes: 3 additions & 3 deletions chain/celo/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ type AddressEncoder = ethereum.AddressEncoder
// the Ethereum chain.
type AddressDecoder = ethereum.AddressDecoder

// An AddressEncoderDecoder on the Celo chain is functionally identical to a
// An AddressEncodeDecoder on the Celo chain is functionally identical to a
// encoder/decoder on the Ethereum chain.
type AddressEncoderDecoder = ethereum.AddressEncoderDecoder
type AddressEncodeDecoder = ethereum.AddressEncodeDecoder

var (
NewAddressEncoderDecoder = ethereum.NewAddressEncoderDecoder
NewAddressEncodeDecoder = ethereum.NewAddressEncodeDecoder
)
2 changes: 1 addition & 1 deletion chain/digibyte/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ import "github.com/renproject/multichain/chain/bitcoin"

type AddressEncoder = bitcoin.AddressEncoder
type AddressDecoder = bitcoin.AddressDecoder
type AddressEncoderDecoder = bitcoin.AddressEncoderDecoder
type AddressEncodeDecoder = bitcoin.AddressEncodeDecoder
6 changes: 3 additions & 3 deletions chain/dogecoin/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dogecoin
import "github.com/renproject/multichain/chain/bitcoin"

type (
AddressEncoder = bitcoin.AddressEncoder
AddressDecoder = bitcoin.AddressDecoder
AddressEncoderDecoder = bitcoin.AddressEncoderDecoder
AddressEncoder = bitcoin.AddressEncoder
AddressDecoder = bitcoin.AddressDecoder
AddressEncodeDecoder = bitcoin.AddressEncodeDecoder
)
6 changes: 3 additions & 3 deletions chain/ethereum/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/renproject/surge"
)

type AddressEncoderDecoder struct {
type AddressEncodeDecoder struct {
AddressEncoder
AddressDecoder
}
Expand All @@ -23,8 +23,8 @@ type AddressEncoder interface {

type addressEncoder struct{}

func NewAddressEncoderDecoder() address.EncoderDecoder {
return AddressEncoderDecoder{
func NewAddressEncodeDecoder() address.EncodeDecoder {
return AddressEncodeDecoder{
AddressEncoder: NewAddressEncoder(),
AddressDecoder: NewAddressDecoder(),
}
Expand Down
2 changes: 1 addition & 1 deletion multichain.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

type (
Address = address.Address
AddressEncoderDecoder = address.EncoderDecoder
AddressEncodeDecoder = address.EncodeDecoder
EthereumCompatAddress = ethereum.Address
RawAddress = address.RawAddress
)
Expand Down

0 comments on commit 96e09ae

Please sign in to comment.