Skip to content

fix: Migrate API usage from *.metafi & *.metaswap subdomains to *.cx.metamask.io" #4301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const sampleTokenA = {
symbol: tokenAFromList.symbol,
decimals: tokenAFromList.decimals,
image:
'https://static.metafi.codefi.network/api/v1/tokenIcons/1/0x514910771af9ca656af840dff83e8264ecf986ca.png',
'https://static.cx.metamask.io/api/v1/tokenIcons/1/0x514910771af9ca656af840dff83e8264ecf986ca.png',
isERC721: false,
aggregators: formattedSampleAggregators,
name: 'Chainlink',
Expand All @@ -99,7 +99,7 @@ const sampleTokenB = {
symbol: tokenBFromList.symbol,
decimals: tokenBFromList.decimals,
image:
'https://static.metafi.codefi.network/api/v1/tokenIcons/1/0x1f573d6fb3f13d689ff844b4ce37794d79a7ff1c.png',
'https://static.cx.metamask.io/api/v1/tokenIcons/1/0x1f573d6fb3f13d689ff844b4ce37794d79a7ff1c.png',
isERC721: false,
aggregators: formattedSampleAggregators,
name: 'Bancor',
Expand Down
36 changes: 18 additions & 18 deletions packages/assets-controllers/src/TokenListController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const sampleMainnetTokenList = [
occurrences: 11,
name: 'Synthetix',
iconUrl:
'https://static.metafi.codefi.network/api/v1/tokenIcons/1/0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f.png',
'https://static.cx.metamask.io/api/v1/tokenIcons/1/0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f.png',
aggregators: [
'Aave',
'Bancor',
Expand All @@ -61,7 +61,7 @@ const sampleMainnetTokenList = [
occurrences: 11,
name: 'Chainlink',
iconUrl:
'https://static.metafi.codefi.network/api/v1/tokenIcons/1/0x514910771af9ca656af840dff83e8264ecf986ca.png',
'https://static.cx.metamask.io/api/v1/tokenIcons/1/0x514910771af9ca656af840dff83e8264ecf986ca.png',
aggregators: [
'Aave',
'Bancor',
Expand All @@ -83,7 +83,7 @@ const sampleMainnetTokenList = [
occurrences: 11,
name: 'Bancor',
iconUrl:
'https://static.metafi.codefi.network/api/v1/tokenIcons/1/0x1f573d6fb3f13d689ff844b4ce37794d79a7ff1c.png',
'https://static.cx.metamask.io/api/v1/tokenIcons/1/0x1f573d6fb3f13d689ff844b4ce37794d79a7ff1c.png',
aggregators: [
'Bancor',
'CMC',
Expand Down Expand Up @@ -121,7 +121,7 @@ const sampleBinanceTokenList = [
'Paraswap',
],
iconUrl:
'https://static.metafi.codefi.network/api/v1/tokenIcons/56/0x7083609fce4d1d8dc0c979aab8c869ea2c873402.png',
'https://static.cx.metamask.io/api/v1/tokenIcons/56/0x7083609fce4d1d8dc0c979aab8c869ea2c873402.png',
},
{
address: '0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3',
Expand All @@ -138,7 +138,7 @@ const sampleBinanceTokenList = [
'Paraswap',
],
iconUrl:
'https://static.metafi.codefi.network/api/v1/tokenIcons/56/0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3.png',
'https://static.cx.metamask.io/api/v1/tokenIcons/56/0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3.png',
},
];

Expand All @@ -159,7 +159,7 @@ const sampleSingleChainState = {
occurrences: 11,
name: 'Synthetix',
iconUrl:
'https://static.metafi.codefi.network/api/v1/tokenIcons/1/0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f.png',
'https://static.cx.metamask.io/api/v1/tokenIcons/1/0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f.png',
aggregators: [
'Aave',
'Bancor',
Expand All @@ -182,7 +182,7 @@ const sampleSingleChainState = {
occurrences: 11,
name: 'Chainlink',
iconUrl:
'https://static.metafi.codefi.network/api/v1/tokenIcons/1/0x514910771af9ca656af840dff83e8264ecf986ca.png',
'https://static.cx.metamask.io/api/v1/tokenIcons/1/0x514910771af9ca656af840dff83e8264ecf986ca.png',
aggregators: [
'Aave',
'Bancor',
Expand All @@ -204,7 +204,7 @@ const sampleSingleChainState = {
occurrences: 11,
name: 'Bancor',
iconUrl:
'https://static.metafi.codefi.network/api/v1/tokenIcons/1/0x1f573d6fb3f13d689ff844b4ce37794d79a7ff1c.png',
'https://static.cx.metamask.io/api/v1/tokenIcons/1/0x1f573d6fb3f13d689ff844b4ce37794d79a7ff1c.png',
aggregators: [
'Bancor',
'CMC',
Expand Down Expand Up @@ -233,7 +233,7 @@ const sampleSepoliaTokenList = [
decimals: 8,
name: 'Wrapped BTC',
iconUrl:
'https://static.metafi.codefi.network/api/v1/tokenIcons/11155111/0x2260fac5e5542a773aa44fbcfedf7c193bc2c599.png',
'https://static.cx.metamask.io/api/v1/tokenIcons/11155111/0x2260fac5e5542a773aa44fbcfedf7c193bc2c599.png',
type: 'erc20',
aggregators: [
'Metamask',
Expand Down Expand Up @@ -264,7 +264,7 @@ const sampleSepoliaTokenList = [
decimals: 18,
name: 'UMA',
iconUrl:
'https://static.metafi.codefi.network/api/v1/tokenIcons/11155111/0x04fa0d235c4abf4bcf4787af4cf447de572ef828.png',
'https://static.cx.metamask.io/api/v1/tokenIcons/11155111/0x04fa0d235c4abf4bcf4787af4cf447de572ef828.png',
type: 'erc20',
aggregators: [
'Metamask',
Expand All @@ -290,7 +290,7 @@ const sampleSepoliaTokenList = [
decimals: 18,
name: 'Gnosis Token',
iconUrl:
'https://static.metafi.codefi.network/api/v1/tokenIcons/11155111/0x6810e776880c02933d47db1b9fc05908e5386b96.png',
'https://static.cx.metamask.io/api/v1/tokenIcons/11155111/0x6810e776880c02933d47db1b9fc05908e5386b96.png',
type: 'erc20',
aggregators: [
'Metamask',
Expand Down Expand Up @@ -335,7 +335,7 @@ const sampleTwoChainState = {
'Paraswap',
],
iconUrl:
'https://static.metafi.codefi.network/api/v1/tokenIcons/56/0x7083609fce4d1d8dc0c979aab8c869ea2c873402.png',
'https://static.cx.metamask.io/api/v1/tokenIcons/56/0x7083609fce4d1d8dc0c979aab8c869ea2c873402.png',
},
'0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3': {
address: '0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3',
Expand All @@ -352,7 +352,7 @@ const sampleTwoChainState = {
'Paraswap',
],
iconUrl:
'https://static.metafi.codefi.network/api/v1/tokenIcons/56/0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3.png',
'https://static.cx.metamask.io/api/v1/tokenIcons/56/0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3.png',
},
},
tokensChainsCache: {
Expand All @@ -376,7 +376,7 @@ const existingState = {
occurrences: 11,
name: 'Chainlink',
iconUrl:
'https://static.metafi.codefi.network/api/v1/tokenIcons/1/0x514910771af9ca656af840dff83e8264ecf986ca.png',
'https://static.cx.metamask.io/api/v1/tokenIcons/1/0x514910771af9ca656af840dff83e8264ecf986ca.png',
aggregators: [
'Aave',
'Bancor',
Expand Down Expand Up @@ -410,7 +410,7 @@ const outdatedExistingState = {
occurrences: 11,
name: 'Chainlink',
iconUrl:
'https://static.metafi.codefi.network/api/v1/tokenIcons/1/0x514910771af9ca656af840dff83e8264ecf986ca.png',
'https://static.cx.metamask.io/api/v1/tokenIcons/1/0x514910771af9ca656af840dff83e8264ecf986ca.png',
aggregators: [
'Aave',
'Bancor',
Expand Down Expand Up @@ -444,7 +444,7 @@ const expiredCacheExistingState: TokenListState = {
occurrences: 9,
name: 'Chainlink',
iconUrl:
'https://static.metafi.codefi.network/api/v1/tokenIcons/1/0x514910771af9ca656af840dff83e8264ecf986ca.png',
'https://static.cx.metamask.io/api/v1/tokenIcons/1/0x514910771af9ca656af840dff83e8264ecf986ca.png',
aggregators: [
'Aave',
'Bancor',
Expand All @@ -471,7 +471,7 @@ const expiredCacheExistingState: TokenListState = {
occurrences: 11,
name: 'Chainlink',
iconUrl:
'https://static.metafi.codefi.network/api/v1/tokenIcons/1/0x514910771af9ca656af840dff83e8264ecf986ca.png',
'https://static.cx.metamask.io/api/v1/tokenIcons/1/0x514910771af9ca656af840dff83e8264ecf986ca.png',
aggregators: [
'Aave',
'Bancor',
Expand Down Expand Up @@ -584,7 +584,7 @@ describe('TokenListController', () => {
occurrences: 11,
name: 'Chainlink',
iconUrl:
'https://static.metafi.codefi.network/api/v1/tokenIcons/1/0x514910771af9ca656af840dff83e8264ecf986ca.png',
'https://static.cx.metamask.io/api/v1/tokenIcons/1/0x514910771af9ca656af840dff83e8264ecf986ca.png',
aggregators: [
'Aave',
'Bancor',
Expand Down
Loading
Loading