diff --git a/packages/common/src/store/ui/buy-sell/utils.ts b/packages/common/src/store/ui/buy-sell/utils.ts index 0a306de1ad0..cb2f323be2d 100644 --- a/packages/common/src/store/ui/buy-sell/utils.ts +++ b/packages/common/src/store/ui/buy-sell/utils.ts @@ -65,12 +65,10 @@ export const findTokenBySymbol = ( tokens: Record ): TokenInfo | null => { if (!symbol || typeof symbol !== 'string') { - console.warn('findTokenBySymbol: Invalid symbol provided:', symbol) return null } if (!tokens || typeof tokens !== 'object') { - console.warn('findTokenBySymbol: Invalid tokens object provided:', tokens) return null } @@ -84,7 +82,6 @@ export const findTokenBySymbol = ( // Try with $ prefix if (tokens[`$${normalized}`]) return tokens[`$${normalized}`] - console.debug(`findTokenBySymbol: Token not found for symbol: ${symbol}`) return null } @@ -96,18 +93,14 @@ export const findTokenByAddress = ( tokens: Record ): TokenInfo | null => { if (!address || typeof address !== 'string') { - console.warn('findTokenByAddress: Invalid address provided:', address) return null } if (!tokens || typeof tokens !== 'object') { - console.warn('findTokenByAddress: Invalid tokens object provided:', tokens) return null } const token = Object.values(tokens).find((token) => token.address === address) - if (!token) { - console.debug(`findTokenByAddress: Token not found for address: ${address}`) - } + return token || null } diff --git a/packages/mobile/src/components/buy-sell/InputTokenSection.tsx b/packages/mobile/src/components/buy-sell/InputTokenSection.tsx index aca822e240f..215e6df4e0a 100644 --- a/packages/mobile/src/components/buy-sell/InputTokenSection.tsx +++ b/packages/mobile/src/components/buy-sell/InputTokenSection.tsx @@ -133,7 +133,7 @@ export const InputTokenSection = ({ hideLabel placeholder={placeholder} startAdornmentText={isStablecoin ? '$' : ''} - endAdornmentText={symbol} + endAdornmentText={symbol === 'USDC' ? 'USD' : symbol} value={localAmount} onChangeText={handleTextChange} keyboardType='numeric' diff --git a/packages/mobile/src/components/buy-sell/OutputTokenSection.tsx b/packages/mobile/src/components/buy-sell/OutputTokenSection.tsx index 21e13a2ee0c..03a82353718 100644 --- a/packages/mobile/src/components/buy-sell/OutputTokenSection.tsx +++ b/packages/mobile/src/components/buy-sell/OutputTokenSection.tsx @@ -77,7 +77,7 @@ export const OutputTokenSection = ({ hideLabel placeholder={placeholder} startAdornmentText={isStablecoin ? '$' : ''} - endAdornmentText={symbol} + endAdornmentText={symbol === 'USDC' ? 'USD' : symbol} value={localAmount} onChangeText={handleTextChange} keyboardType='numeric' diff --git a/packages/mobile/src/screens/coin-details-screen/components/CoinInsightsCard.tsx b/packages/mobile/src/screens/coin-details-screen/components/CoinInsightsCard.tsx index 31e17a9fa6b..2b0820a55d9 100644 --- a/packages/mobile/src/screens/coin-details-screen/components/CoinInsightsCard.tsx +++ b/packages/mobile/src/screens/coin-details-screen/components/CoinInsightsCard.tsx @@ -15,6 +15,7 @@ import { } from '@audius/harmony-native' import { TooltipInfoIcon } from 'app/components/buy-sell/TooltipInfoIcon' import { useDrawer } from 'app/hooks/useDrawer' +import { env } from 'app/services/env' import { isIos } from 'app/utils/os' import { GraduationProgressBar } from './GraduationProgressBar' @@ -96,7 +97,9 @@ const MetricRow = ({ metric, coin }: { metric: MetricData; coin?: Coin }) => { const isGraduationProgress = metric.label === 'Graduation Progress' if (isGraduationProgress) { - return + return env.WAUDIO_MINT_ADDRESS === coin?.mint ? null : ( + + ) } return ( diff --git a/packages/web/src/components/buy-sell-modal/BuyTab.tsx b/packages/web/src/components/buy-sell-modal/BuyTab.tsx index 161141256b1..f763bcaa50e 100644 --- a/packages/web/src/components/buy-sell-modal/BuyTab.tsx +++ b/packages/web/src/components/buy-sell-modal/BuyTab.tsx @@ -109,6 +109,7 @@ export const BuyTab = ({ availableBalance={availableBalance} error={error} errorMessage={errorMessage} + hideTokenDisplay={true} /> diff --git a/packages/web/src/components/buy-sell-modal/components/InputTokenSection.tsx b/packages/web/src/components/buy-sell-modal/components/InputTokenSection.tsx index d02f12c956a..7f47efa7378 100644 --- a/packages/web/src/components/buy-sell-modal/components/InputTokenSection.tsx +++ b/packages/web/src/components/buy-sell-modal/components/InputTokenSection.tsx @@ -40,6 +40,7 @@ type InputTokenSectionProps = { tokenPriceDecimalPlaces?: number availableTokens?: TokenInfo[] onTokenChange?: (token: TokenInfo) => void + hideTokenDisplay?: boolean } export const InputTokenSection = ({ @@ -54,7 +55,8 @@ export const InputTokenSection = ({ error, errorMessage, availableTokens, - onTokenChange + onTokenChange, + hideTokenDisplay = false }: InputTokenSectionProps) => { const { symbol, isStablecoin } = tokenInfo const [localAmount, setLocalAmount] = useState(amount || '') @@ -131,7 +133,7 @@ export const InputTokenSection = ({ hideLabel placeholder={placeholder} startAdornmentText={isStablecoin ? '$' : ''} - endAdornmentText={symbol} + endAdornmentText={symbol === 'USDC' ? 'USD' : symbol} value={localAmount} onChange={(e) => handleTextChange(e.target.value)} type='number' @@ -140,7 +142,7 @@ export const InputTokenSection = ({ /> - {shouldDisplayTokenDropdown ? ( + {!hideTokenDisplay && shouldDisplayTokenDropdown ? ( ({ minWidth: theme.spacing.unit15 })}> - ) : ( + ) : !hideTokenDisplay ? ( ({ minWidth: theme.spacing.unit15 })}> - )} + ) : null} {onMaxClick ? (