fix: celer check on tokens

This commit is contained in:
Anthony Laibe 2023-07-31 12:44:05 +02:00
parent cbb845b574
commit a139871383
1 changed files with 4 additions and 0 deletions

View File

@ -178,6 +178,10 @@ func (s *CBridge) Can(from, to *params.Network, token *token.Token, balance *big
} }
found := false found := false
if _, ok := transferConfig.ChainToken[fromAvailable.GetId()]; !ok {
return false, nil
}
for _, tokenInfo := range transferConfig.ChainToken[fromAvailable.GetId()].Token { for _, tokenInfo := range transferConfig.ChainToken[fromAvailable.GetId()].Token {
if tokenInfo.Token.Symbol == token.Symbol { if tokenInfo.Token.Symbol == token.Symbol {
found = true found = true