Generalize assets URL by chainId; change trustwallet image to reflect new directory structure
This commit is contained in:
parent
c650c2f819
commit
3f503ab317
|
@ -10,7 +10,7 @@ RUN npm run build
|
|||
FROM alpine:3.14.0 AS logobuilder
|
||||
RUN apk add imagemagick parallel
|
||||
WORKDIR /assets
|
||||
COPY trustwallet/blockchains/ethereum/assets /assets/
|
||||
COPY trustwallet/blockchains/ethereum/assets /assets/1/
|
||||
RUN find . -name logo.png | parallel magick convert {} -filter Lanczos -resize 32x32 {}
|
||||
|
||||
FROM alpine:3.14.0 AS fourbytesbuilder
|
||||
|
|
|
@ -9,13 +9,11 @@ export const fourBytesURL = (
|
|||
export const topic0URL = (assetsURLPrefix: string, topic0: string): string =>
|
||||
`${assetsURLPrefix}/topic0/${topic0}`;
|
||||
|
||||
// TODO: generalize URL
|
||||
export const tokenLogoURL = (
|
||||
assetsURLPrefix: string,
|
||||
chainId: number,
|
||||
address: string
|
||||
): string => `${assetsURLPrefix}/assets/${address}/logo.png`;
|
||||
// ): string => `${assetsURLPrefix}/assets/${chainId}/${address}/logo.png`;
|
||||
): string => `${assetsURLPrefix}/assets/${chainId}/${address}/logo.png`;
|
||||
|
||||
export const blockURL = (blockNum: BlockTag) => `/block/${blockNum}`;
|
||||
|
||||
|
|
Loading…
Reference in New Issue