fix_: trying to figure correct hop bridge contract type if empty one is provided

This commit is contained in:
Sale Djenic 2024-06-10 14:39:49 +02:00 committed by saledjenic
parent d182fb762a
commit 7fa6a68845
1 changed files with 8 additions and 0 deletions

View File

@ -164,6 +164,14 @@ func (c *HopBridgeProcessor) getAppropriateABI(contractType string, chainID uint
} }
func (h *HopBridgeProcessor) PackTxInputData(params ProcessorInputParams, contractType string) ([]byte, error) { func (h *HopBridgeProcessor) PackTxInputData(params ProcessorInputParams, contractType string) ([]byte, error) {
if contractType == "" {
_, ct, err := hop.GetContractAddress(params.FromChain.ChainID, params.FromToken.Symbol)
if err != nil {
return []byte{}, err
}
contractType = ct
}
abi, err := h.getAppropriateABI(contractType, params.FromChain.ChainID, params.FromToken) abi, err := h.getAppropriateABI(contractType, params.FromChain.ChainID, params.FromToken)
if err != nil { if err != nil {
return []byte{}, err return []byte{}, err