diff --git a/bchain/coins/bsc/bscrpc.go b/bchain/coins/bsc/bscrpc.go index 383f7eb51b..a1fb649cd8 100644 --- a/bchain/coins/bsc/bscrpc.go +++ b/bchain/coins/bsc/bscrpc.go @@ -38,6 +38,7 @@ func NewBNBSmartChainRPC(config json.RawMessage, pushHandler func(bchain.Notific s := &BNBSmartChainRPC{ EthereumRPC: c.(*eth.EthereumRPC), } + s.Parser.EnsSuffix = ".bnb" return s, nil } diff --git a/bchain/coins/eth/ethparser.go b/bchain/coins/eth/ethparser.go index 161c14ad18..73f58b621a 100644 --- a/bchain/coins/eth/ethparser.go +++ b/bchain/coins/eth/ethparser.go @@ -25,15 +25,19 @@ const EtherAmountDecimalPoint = 18 // EthereumParser handle type EthereumParser struct { *bchain.BaseParser + EnsSuffix string } // NewEthereumParser returns new EthereumParser instance func NewEthereumParser(b int, addressAliases bool) *EthereumParser { - return &EthereumParser{&bchain.BaseParser{ - BlockAddressesToKeep: b, - AmountDecimalPoint: EtherAmountDecimalPoint, - AddressAliases: addressAliases, - }} + return &EthereumParser{ + BaseParser: &bchain.BaseParser{ + BlockAddressesToKeep: b, + AmountDecimalPoint: EtherAmountDecimalPoint, + AddressAliases: addressAliases, + }, + EnsSuffix: ".eth", + } } type rpcHeader struct { @@ -489,7 +493,7 @@ func (p *EthereumParser) EthereumTypeGetTokenTransfersFromTx(tx *bchain.Tx) (bch // FormatAddressAlias adds .eth to a name alias func (p *EthereumParser) FormatAddressAlias(address string, name string) string { - return name + ".eth" + return name + p.EnsSuffix } // TxStatus is status of transaction