Skip to content

Commit eb3dc3b

Browse files
committed
test: fix
1 parent cd2fb57 commit eb3dc3b

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

app/components/UI/MarketInsights/Views/MarketInsightsView/MarketInsightsView.view.test.tsx

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ const ETH_MAINNET_ROUTE_PARAMS = {
2727
tokenDecimals: 18,
2828
tokenName: 'Ethereum',
2929
tokenChainId: CHAIN_IDS.MAINNET,
30+
token: {
31+
address: '0x123',
32+
symbol: 'ETH',
33+
decimals: 18,
34+
name: 'Ethereum',
35+
chainId: '0x1',
36+
image: 'https://example.com/eth.png',
37+
balance: '0',
38+
logo: undefined,
39+
},
3040
};
3141

3242
describeForPlatforms('MarketInsightsView (token flow)', () => {
@@ -41,6 +51,48 @@ describeForPlatforms('MarketInsightsView (token flow)', () => {
4151
it('displays market insights content and navigates to swap', async () => {
4252
renderMarketInsightsViewWithNavigation({
4353
initialParams: ETH_MAINNET_ROUTE_PARAMS,
54+
overrides: {
55+
engine: {
56+
backgroundState: {
57+
TokensController: {
58+
allTokens: {
59+
'0x1': {
60+
'0x0000000000000000000000000000000000000001': [
61+
{
62+
address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
63+
decimals: 6,
64+
symbol: 'USDC',
65+
name: 'USD Coin',
66+
image: '',
67+
},
68+
],
69+
},
70+
},
71+
allIgnoredTokens: {},
72+
},
73+
TokenBalancesController: {
74+
tokenBalances: {
75+
'0x0000000000000000000000000000000000000001': {
76+
'0x1': {
77+
'0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48': '0x3b9aca00',
78+
},
79+
},
80+
},
81+
},
82+
TokenRatesController: {
83+
marketData: {
84+
'0x1': {
85+
'0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48': {
86+
tokenAddress: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
87+
currency: 'ETH',
88+
price: 0.0005,
89+
},
90+
},
91+
},
92+
},
93+
},
94+
},
95+
},
4496
});
4597

4698
expect(

0 commit comments

Comments
 (0)