function CurrencyCircleIcon({
  currency,
  size,
  showSpinner,
  showCheckmark,
}: {
  currency: CryptoCurrency | TokenCurrency,
  size: number,
  showSpinner?: boolean,
  showCheckmark?: boolean,
}) {
  const bgColor = useTheme("colors.palette.background.paper");
  const cryptoColor = useMemo(
    () => (currency.type === "CryptoCurrency" ? ensureContrast(currency.color, bgColor) : ""),
    [currency, bgColor],
  );
  if (currency.type === "TokenCurrency") {
    return <ParentCryptoCurrencyIcon currency={currency} bigger />;
  }
  const Icon = getCryptoCurrencyIcon(currency);
  return (
    <CryptoIconWrapper size={size} showCheckmark={showCheckmark} cryptoColor={cryptoColor}>
      {Icon && <Icon size={size * 0.6} />}
      {showCheckmark && (
        <div>
          <IconCheckFull size={22} />
        </div>
      )}
      {showSpinner && (
        <SpinnerWrapper>
          <Spinner color="palette.text.shade60" size={14} />
        </SpinnerWrapper>
      )}
    </CryptoIconWrapper>
  );
}
Nb Not to be confused with CryptoCurrencyIcon which also has a circle
mode. Not worth refactoring since this one brings the spinner/check-mark
and CryptoCurrencyIcon is used in the selects.