From 8c6c17a385c8341e6e916d14de453b3a7edd3790 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 2 Oct 2024 15:22:08 +0200 Subject: [PATCH] fix logo for details page as well --- src/app/rewards/page.tsx | 13 +++++++++++-- src/app/utils.ts | 5 ++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/app/rewards/page.tsx b/src/app/rewards/page.tsx index 4840b432..d2ba8a95 100644 --- a/src/app/rewards/page.tsx +++ b/src/app/rewards/page.tsx @@ -22,6 +22,7 @@ import { getTokenRewards, getTypeRewards } from "../state/rewardUtils"; // import * as adex from "alphadex-sdk-js"; import { DexterToast } from "../components/DexterToaster"; +import { DEXTER_LOGO_URL } from "utils"; export default function Rewards() { const { showSuccessUi } = useAppSelector((state) => state.rewardSlice); @@ -199,7 +200,11 @@ function RewardsOverview() { key={indx} > {rewardToken.name} @@ -312,7 +317,11 @@ function RewardsDetails() { key={indx2} > {tokenReward.name} diff --git a/src/app/utils.ts b/src/app/utils.ts index 56d38f1f..1a37cba9 100644 --- a/src/app/utils.ts +++ b/src/app/utils.ts @@ -2,6 +2,9 @@ import * as adex from "alphadex-sdk-js"; import { TokenInfo } from "./state/pairSelectorSlice"; import type { OrderReceipt } from "alphadex-sdk-js"; +export const DEXTER_LOGO_URL = + "https://assets.coingecko.com/coins/images/34946/standard/DEXTRLogo.jpg"; + export function displayPositiveNumber( x: number, noDigits: number = 6, @@ -315,7 +318,7 @@ export function updateIconIfNeeded(token: adex.TokenInfo): TokenInfo { const iconUrl = token.symbol === "DEXTR" ? // use asset from coingecko to prevent ipfs failure - "https://assets.coingecko.com/coins/images/34946/standard/DEXTRLogo.jpg" + DEXTER_LOGO_URL : token.symbol === "RDK" ? // fix wrong icon URL in metadata ofRDK on ledger, see https://t.me/radix_dlt/716425 "https://radket.shop/img/logo.svg"