Fixes for the production docker image

This commit is contained in:
Willian Mitsuda 2021-07-09 14:13:31 -03:00
parent ea7b7a9f75
commit 052b2f61e0
3 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ const MethodName: React.FC<MethodNameProps> = ({ data }) => {
return; return;
} }
const signatureURL = fourBytesURL(config.assetsURLPrefix, fourBytes); const signatureURL = fourBytesURL(config.assetsURLPrefix ?? "", fourBytes);
fetch(signatureURL) fetch(signatureURL)
.then(async (res) => { .then(async (res) => {
if (!res.ok) { if (!res.ok) {

View File

@ -19,7 +19,7 @@ const InternalTokenLogo: React.FC<TokenLogoProps> = ({ address, name }) => {
const srcList: string[] = []; const srcList: string[] = [];
if (config) { if (config) {
srcList.push(tokenLogoURL(config.assetsURLPrefix, address)); srcList.push(tokenLogoURL(config.assetsURLPrefix ?? "", address));
} }
srcList.push("/eth-diamond-black.png"); srcList.push("/eth-diamond-black.png");
const { src } = useImage({ srcList }); const { src } = useImage({ srcList });

View File

@ -1,8 +1,8 @@
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
export type OtterscanConfig = { export type OtterscanConfig = {
erigonURL: string; erigonURL?: string;
assetsURLPrefix: string; assetsURLPrefix?: string;
}; };
export const useConfig = (): [boolean?, OtterscanConfig?] => { export const useConfig = (): [boolean?, OtterscanConfig?] => {