diff --git a/.env b/.env index 5b2f444bd..c7443c899 100644 --- a/.env +++ b/.env @@ -26,7 +26,6 @@ PRICES_SERVICE_URI=prices.mainnet.teritori.com:443 SUBSTREAMS_API_TOKEN= #app env -EXPO_PUBLIC_IMG_PROXY_URL=https://imgproxy.tools.teritori.com/insecure/ EXPO_PUBLIC_PUBLIC_TENOR_KEY=AIzaSyA8TpVfoyoBaDdLww6wJ1Xe0OVN-Hi8qPE #map token diff --git a/mainnet.env b/mainnet.env index d747a2f26..e9feb86f9 100644 --- a/mainnet.env +++ b/mainnet.env @@ -21,5 +21,3 @@ PRICES_DB_USER=postgres PRICES_DB_PASSWORD=magic PRICES_SERVICE_URI=prices.mainnet.teritori.com:443 - -IMG_PROXY_URL=https://imgproxy.tools.teritori.com/insecure/ diff --git a/packages/components/OptimizedImage.tsx b/packages/components/OptimizedImage.tsx index bd3dbdef8..a81c2f648 100644 --- a/packages/components/OptimizedImage.tsx +++ b/packages/components/OptimizedImage.tsx @@ -106,29 +106,10 @@ const transformURI = ( uri = "ipfs://" + uri; } catch {} - const knownScheme = ["https://", "http://", "ipfs://"].find((scheme) => - uri?.startsWith(scheme), - ); - if (!knownScheme) { - return uri; - } - if (uri?.startsWith("ipfs://")) { // XXX: allow passing a dev token return `https://teritori.mypinata.cloud/ipfs/${uri.substring("ipfs://".length)}?img-width=${Math.round(width)}&img-height=${Math.round(height)}&img-fit=contain`; } - const params = resolveParams(width, height); - - return `${process.env.EXPO_PUBLIC_IMG_PROXY_URL}${params}/plain/${encodeURIComponent( - uri, - )}`; -}; - -const resolveParams = (width: number, height: number) => { - const params: string[] = []; - params.push(`width:${Math.round(width)}`); - params.push(`height:${Math.round(height)}`); - - return params.join("/"); + return uri; };