mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
engine: filter and warning for empty string when syncing all deposit addresses (#1086)
* helpers: transfer chains and deposit addresses filter and alert zero value string * engine: remove 'Err:' as it's not an error. * engine: remove '.' to be in line with other logs. Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
This commit is contained in:
@@ -742,6 +742,13 @@ func (bot *Engine) GetAllExchangeCryptocurrencyDepositAddresses() map[string]map
|
||||
depositAddrs = append(depositAddrs, *depositAddr)
|
||||
}
|
||||
for z := range availChains {
|
||||
if availChains[z] == "" {
|
||||
log.Warnf(log.Global, "%s %s available transfer chain is populated with an empty string\n",
|
||||
exchName,
|
||||
cryptocurrency)
|
||||
continue
|
||||
}
|
||||
|
||||
depositAddr, err := exch.GetDepositAddress(context.TODO(), currency.NewCode(cryptocurrency), "", availChains[z])
|
||||
if err != nil {
|
||||
log.Errorf(log.Global, "%s failed to get cryptocurrency deposit address for %s [chain %s]. Err: %s\n",
|
||||
|
||||
@@ -1029,7 +1029,7 @@ func (f fakeDepositExchange) GetAvailableTransferChains(_ context.Context, c cur
|
||||
return nil, nil
|
||||
}
|
||||
if c.Equal(currency.USDT) {
|
||||
return []string{"sol", "btc", "usdt"}, nil
|
||||
return []string{"sol", "btc", "usdt", ""}, nil
|
||||
}
|
||||
return []string{"BITCOIN"}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user