diff --git a/packages/client/src/pages/discover/TokenCard.tsx b/packages/client/src/pages/discover/TokenCard.tsx index 6e223ad..ec3603d 100644 --- a/packages/client/src/pages/discover/TokenCard.tsx +++ b/packages/client/src/pages/discover/TokenCard.tsx @@ -1,6 +1,5 @@ import FlexSeparator from "../../shared/components/FlexSeparator.tsx"; import Icon from "../../shared/components/Icon.tsx"; -import { formatAddress } from "../../shared/lib/utils.ts"; export default function TokenCard() { return ( diff --git a/packages/client/src/shared/lib/utils.ts b/packages/client/src/shared/lib/utils.ts index 812c7a6..80cbda5 100644 --- a/packages/client/src/shared/lib/utils.ts +++ b/packages/client/src/shared/lib/utils.ts @@ -17,21 +17,3 @@ export function formatAddress(address: string) { address.slice(address.length - 5, address.length) ); } - -export function getImageDominantRgb( - src: string, -): Promise { - return new Promise((resolve) => { - const context = document.createElement("canvas").getContext("2d"); - context!.imageSmoothingEnabled = true; - - let img = new Image(); - img.src = src; - img.crossOrigin = ""; - - img.onload = () => { - context!.drawImage(img, 0, 0, 1, 1); - resolve(context!.getImageData(0, 0, 1, 1).data.slice(0, 3)); - }; - }); -}