// Sometimes a wallet might be valid for eth but not for bsc and vice versa.
// Therefore we need to be resilient in such cases.
// Maybe a smarter way would be more appropriate here such as better design in channels and go routines
Sometimes a wallet might be valid for eth but not for bsc and vice versa.
Therefore we need to be resilient in such cases.
Maybe a smarter way would be more appropriate here such as better design in channels and go routines
// Sometimes a wallet might be valid for eth but not for bsc and vice versa . // Therefore we need to be resilient in such cases . // Maybe a smarter way would be more appropriate here such as better design in channels and go routines
func determineError(bscFees float64, ethFees float64, bnbusdRate float64, ethusdRate float64, err error) error {
	if err == nil {
		return nil
	}
	if bnbusdRate == 0 || ethusdRate == 0 {
		return fmt.Errorf("could not determine currency rates: %w", err)
	}
	if bscFees == 0 && ethFees == 0 {
		return fmt.Errorf("could not determine fees: %w", err)
	}
	return nil
}
func determineError ( bscFees float64 , ethFees float64 , bnbusdRate float64 , ethusdRate float64 , err error ) error { if err == nil { return nil } if bnbusdRate == 0 || ethusdRate == 0 { return fmt . Errorf ( " " , err ) } if bscFees == 0 && ethFees == 0 { return fmt . Errorf ( " " , err ) } return nil }
Sometimes a wallet might be valid for eth but not for bsc and vice versa.
Sometimes a wallet might be valid for eth but not for bsc and vice versa .