Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/components/Currency.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ export function Currency(props: Props) {
href={`${makeBlockExplorerLink(address, chainId, "address")}`}
className="border text-sm inline-flex gap-2 items-center border-dashed border-dark/50 hover:border-dark rounded-lg px-1 mr-1"
>
{symbolForDisplay}
{hasIcon ? (
<Icon className="w-[16px] h-[16px] inline-block" />
<>
{symbolForDisplay}
<Icon className="w-[16px] h-[16px] inline-block" />
</>
) : (
symbolForDisplay
)}
Expand Down
8 changes: 4 additions & 4 deletions src/constants/tokens.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import type { Address } from "wagmi";

// Add chains as we support bridged usdc
const USDC_MAP: {
[key: number]: Record<Address, string>;
} = {
const USDC_MAP: Record<number, Record<Address, string>> = {
137: {
"0x2791bca1f2de4661ed88a30c99a7a9449aa84174": "USDC.e",
},
Expand All @@ -14,5 +12,7 @@ export function resolveUsdcSymbol(
address: Address | undefined,
) {
if (!chainId || !address) return;
return USDC_MAP?.[chainId]?.[address];
return Object.entries(USDC_MAP?.[chainId] ?? {})?.find(
([add, _]) => add.toLowerCase() === address.toLowerCase(),
)?.[1];
}