diff --git a/packages/app/src/components/TokenAmountPrice.vue b/packages/app/src/components/TokenAmountPrice.vue index c5364906c7..e56dd2a591 100644 --- a/packages/app/src/components/TokenAmountPrice.vue +++ b/packages/app/src/components/TokenAmountPrice.vue @@ -3,7 +3,13 @@
diff --git a/packages/app/src/components/TokenIconLabel.vue b/packages/app/src/components/TokenIconLabel.vue index 56dc4adae5..39675f1fd0 100644 --- a/packages/app/src/components/TokenIconLabel.vue +++ b/packages/app/src/components/TokenIconLabel.vue @@ -11,7 +11,7 @@
@@ -35,8 +35,6 @@ import { useImage } from "@vueuse/core"; import AddressLink from "@/components/AddressLink.vue"; -import useTokenLibrary from "@/composables/useTokenLibrary"; - import type { Hash } from "@/types"; export type IconSize = "sm" | "md" | "lg" | "xl"; @@ -57,7 +55,7 @@ const props = defineProps({ default: "sm", }, iconUrl: { - type: String, + type: [String, null] as PropType, default: "", }, showLinkSymbol: { @@ -70,26 +68,10 @@ const props = defineProps({ }, }); -const { - isRequestPending: isTokensRequestPending, - isRequestFailed: isTokensRequestFailed, - getToken, - getTokens, -} = useTokenLibrary(); - -getTokens(); - const imgSource = computed(() => { - if (props.iconUrl) { - return props.iconUrl; - } - const tokenFromLibrary = getToken(props.address); - return tokenFromLibrary?.iconURL ? tokenFromLibrary.iconURL : "/images/currencies/customToken.svg"; + return props.iconUrl || "/images/currencies/customToken.svg"; }); const { isReady: isImageLoaded } = useImage({ src: imgSource.value }); -const isImageReady = computed( - () => (!isTokensRequestPending.value && !isTokensRequestFailed.value && isImageLoaded.value) || props.iconUrl -);