Skip to content

Commit 2a8e220

Browse files
feat: use aws for token and chain images (#724)
* feat: use aws for token and chain images * fix: address code rabbit feedback * fix: add missing mock-logo.webp from src dir
1 parent a6a51e6 commit 2a8e220

File tree

11 files changed

+12
-13
lines changed

11 files changed

+12
-13
lines changed

examples/react/ethers5/src/components/SwapForm/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const WETH_SEPOLIA = WRAPPED_NATIVE_CURRENCIES[chainId]
1616

1717
const USDC_SEPOLIA: TokenInfo = {
1818
logoUrl:
19-
'https://raw.githubusercontent.com/cowprotocol/token-lists/main/src/public/images/1/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48/logo.png',
19+
'https://files.cow.fi/token-lists/images/1/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48/logo.png',
2020
chainId: SupportedChainId.SEPOLIA,
2121
address: '0xbe72E441BF55620febc26715db68d3494213D8Cb',
2222
decimals: 18,

examples/react/ethers6/src/components/SwapForm/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const WETH_SEPOLIA = WRAPPED_NATIVE_CURRENCIES[chainId]
1616

1717
const USDC_SEPOLIA: TokenInfo = {
1818
logoUrl:
19-
'https://raw.githubusercontent.com/cowprotocol/token-lists/main/src/public/images/1/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48/logo.png',
19+
'https://files.cow.fi/token-lists/images/1/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48/logo.png',
2020
chainId: SupportedChainId.SEPOLIA,
2121
address: '0xbe72E441BF55620febc26715db68d3494213D8Cb',
2222
decimals: 18,

examples/react/viem/src/components/SwapForm/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const WETH_SEPOLIA = WRAPPED_NATIVE_CURRENCIES[chainId]
1717

1818
const USDC_SEPOLIA: TokenInfo = {
1919
logoUrl:
20-
'https://raw.githubusercontent.com/cowprotocol/token-lists/main/src/public/images/1/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48/logo.png',
20+
'https://files.cow.fi/token-lists/images/1/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48/logo.png',
2121
chainId: SupportedChainId.SEPOLIA,
2222
address: '0xbe72E441BF55620febc26715db68d3494213D8Cb',
2323
decimals: 18,

packages/bridging/src/const.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { RAW_FILES_PATH } from '@cowprotocol/sdk-config'
22

3-
export const RAW_PROVIDERS_FILES_PATH = `${RAW_FILES_PATH}/src/bridging/providers`
3+
export const RAW_PROVIDERS_FILES_PATH = `${RAW_FILES_PATH}/bridging/providers`
44
// Based on https://dashboard.tenderly.co/shoom/project/simulator/a5e29dac-d0f2-407f-9e3d-d1b916da595b
55
export const DEFAULT_GAS_COST_FOR_HOOK_ESTIMATION = 240_000
66
export const DEFAULT_EXTRA_GAS_FOR_HOOK_ESTIMATION = 200_000

packages/bridging/src/providers/mock/BaseMockBridgeProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export abstract class BaseMockBridgeProvider implements BridgeProvider<BridgeQuo
2929

3030
info = {
3131
name,
32-
logoUrl: `${RAW_PROVIDERS_FILES_PATH}/mock/mock-logo.png`,
32+
logoUrl: `${RAW_PROVIDERS_FILES_PATH}/mock/mock-logo.webp`,
3333
dappId: 'dapp-id-' + name,
3434
website: `https://mock.com/${name}`,
3535
type: providerType,

packages/bridging/src/providers/mock/HookMockBridgeProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class MockHookBridgeProvider extends BaseMockBridgeProvider implements Ho
1414

1515
info = {
1616
name,
17-
logoUrl: `${RAW_PROVIDERS_FILES_PATH}/mock/mock-logo.png`,
17+
logoUrl: `${RAW_PROVIDERS_FILES_PATH}/mock/mock-logo.webp`,
1818
dappId: 'dapp-id-' + name,
1919
website: `https://mock.com/${name}`,
2020
type: providerType,

packages/bridging/src/providers/mock/ReceiverAccountMockBridgeProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class MockReceiverAccountBridgeProvider
2121
// @ts-ignore
2222
info = {
2323
name,
24-
logoUrl: `${RAW_PROVIDERS_FILES_PATH}/mock/mock-logo.png`,
24+
logoUrl: `${RAW_PROVIDERS_FILES_PATH}/mock/mock-logo.webp`,
2525
dappId: 'dapp-id-' + name,
2626
website: `https://mock.com/${name}`,
2727
type: providerType,

packages/config/src/constants/path.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// Base path to GitHub raw files
2-
export const RAW_FILES_PATH = 'https://raw.githubusercontent.com/cowprotocol/cow-sdk/refs/heads/main'
1+
// Base CDN path for SDK files
2+
export const RAW_FILES_PATH = 'https://files.cow.fi/cow-sdk'
33

4-
// for chains
5-
export const RAW_CHAINS_FILES_PATH = `${RAW_FILES_PATH}/packages/config/src/chains`
4+
// CDN path for chain data
5+
export const RAW_CHAINS_FILES_PATH = `${RAW_FILES_PATH}/chains`

packages/config/src/constants/tokens.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { SupportedChainId } from '../chains'
22
import { TokenInfo } from '../types/tokens'
33

44
export const NATIVE_CURRENCY_ADDRESS = '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE'
5-
export const TOKEN_LIST_IMAGES_PATH = 'https://raw.githubusercontent.com/cowprotocol/token-lists/main/src/public/images'
5+
export const TOKEN_LIST_IMAGES_PATH = 'https://files.cow.fi/token-lists/images'
66

77
const wrappedNativeCurrencyEth = {
88
decimals: 18,

0 commit comments

Comments
 (0)