forked from blockscout/frontend
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of ssh://github.com/blockscout/frontend into sync…
…-02-07
- Loading branch information
Showing
27 changed files
with
217 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,128 +1,161 @@ | ||
export const averageGasPrice = { | ||
import type * as stats from '@blockscout/stats-types'; | ||
|
||
export const averageGasPrice: stats.LineChart = { | ||
chart: [ | ||
{ | ||
date: '2023-12-22', | ||
value: '37.7804422597599', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2023-12-23', | ||
value: '25.84889883009387', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2023-12-24', | ||
value: '25.818463227198574', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2023-12-25', | ||
value: '26.045513050051298', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2023-12-26', | ||
value: '21.42600692652399', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2023-12-27', | ||
value: '31.066730409846656', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2023-12-28', | ||
value: '33.63955781902089', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2023-12-29', | ||
value: '28.064736756058384', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2023-12-30', | ||
value: '23.074500869678175', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2023-12-31', | ||
value: '17.651005734615133', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2024-01-01', | ||
value: '14.906085174476441', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2024-01-02', | ||
value: '22.28459059038656', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2024-01-03', | ||
value: '39.8311646806592', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2024-01-04', | ||
value: '26.09989322256083', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2024-01-05', | ||
value: '22.821996688111998', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2024-01-06', | ||
value: '20.32680041262083', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2024-01-07', | ||
value: '32.535045831809704', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2024-01-08', | ||
value: '27.443477102139482', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2024-01-09', | ||
value: '20.7911332558055', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2024-01-10', | ||
value: '42.10740192523919', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2024-01-11', | ||
value: '35.75215680343582', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2024-01-12', | ||
value: '27.430414798093253', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2024-01-13', | ||
value: '20.170934096589875', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2024-01-14', | ||
value: '38.79660984371034', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2024-01-15', | ||
value: '26.140740484554204', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2024-01-16', | ||
value: '36.708543184194156', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2024-01-17', | ||
value: '40.325438794298876', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2024-01-18', | ||
value: '37.55145309930694', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2024-01-19', | ||
value: '33.271450114434664', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2024-01-20', | ||
value: '19.303304377685638', | ||
is_approximate: false, | ||
}, | ||
{ | ||
date: '2024-01-21', | ||
value: '14.375908594704976', | ||
is_approximate: false, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import type { TestFixture, Page } from '@playwright/test'; | ||
import _isEqual from 'lodash/isEqual'; | ||
import type { PublicRpcSchema } from 'viem'; | ||
|
||
import { getEnvValue } from 'configs/app/utils'; | ||
|
||
type Params = PublicRpcSchema[number]; | ||
|
||
export type MockRpcResponseFixture = (params: Params) => Promise<void>; | ||
|
||
// WIP | ||
const fixture: TestFixture<MockRpcResponseFixture, { page: Page }> = async({ page }, use) => { | ||
await use(async({ Method, ReturnType }) => { | ||
const rpcUrl = getEnvValue('NEXT_PUBLIC_NETWORK_RPC_URL'); | ||
|
||
if (!rpcUrl) { | ||
return; | ||
} | ||
|
||
await page.route(rpcUrl, (route) => { | ||
const method = route.request().method(); | ||
|
||
if (method !== 'POST') { | ||
route.continue(); | ||
return; | ||
} | ||
|
||
const json = route.request().postDataJSON(); | ||
const id = json?.id; | ||
|
||
const payload = { | ||
id, | ||
jsonrpc: '2.0', | ||
method: Method, | ||
// TODO: add params to match actual payload | ||
}; | ||
|
||
if (_isEqual(json, payload) && id !== undefined) { | ||
return route.fulfill({ | ||
status: 200, | ||
body: JSON.stringify({ | ||
id, | ||
jsonrpc: '2.0', | ||
result: ReturnType, | ||
}), | ||
}); | ||
} | ||
}); | ||
}); | ||
}; | ||
|
||
export default fixture; |
Oops, something went wrong.