Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Integrate Tokens table data from the subgraph #98

Merged
merged 49 commits into from
Jun 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
170eae2
update field names and types
ramirotw May 6, 2022
c01fa67
remove items per page dropdown
ramirotw May 6, 2022
2b04a4d
add shimmer
ramirotw May 6, 2022
766d811
Merge remote-tracking branch 'origin/39/tokens-table' into 39/tokens-…
ramirotw May 7, 2022
0d92cde
Merge remote-tracking branch 'origin/39/tokens-table' into 39/tokens-…
ramirotw May 9, 2022
7ccfa2a
Merge remote-tracking branch 'origin/39/tokens-table' into 39/tokens-…
ramirotw May 9, 2022
30198cf
Merge remote-tracking branch 'origin/39/tokens-table' into 39/tokens-…
ramirotw May 11, 2022
9eae8ad
Merge remote-tracking branch 'origin/39/tokens-table' into 39/tokens-…
ramirotw May 13, 2022
8b9b480
fetch tokens data from the subgraph
ramirotw May 16, 2022
fdfaeb2
add coingecko price history
ramirotw May 19, 2022
1554e57
reset tokens table on network switch
ramirotw May 19, 2022
c743d48
use test cow-sdk package for mainnet subgraph
ramirotw May 19, 2022
e3c32c6
Merge remote-tracking branch 'origin/35-epic-home-page' into 39/token…
ramirotw May 19, 2022
c44649b
Merge remote-tracking branch 'origin/35-epic-home-page' into 39/token…
ramirotw May 19, 2022
ba2955d
get historical data from the subgraph
ramirotw May 20, 2022
79ddffa
fix timestamp type
ramirotw May 23, 2022
8bfebbc
Update TokenTable: Add address field to filtering + Add link to tokens
matextrem May 24, 2022
a84d3a9
Fix styles change units to rem
matextrem May 26, 2022
6c1f951
use the official hosted-service mainnet subgraph again
ramirotw May 30, 2022
a2fdc11
bump node engine to 16 due to an error with the latest dependencies a…
ramirotw May 30, 2022
cda03ed
fix timestamp type
ramirotw May 30, 2022
022e456
bump graphql to fix DocumentNode type incompatibility with the sdk
ramirotw May 30, 2022
0c084f8
Improve loading + add tooltip to price column
matextrem May 30, 2022
ed2cd5b
bump node version on the ci
ramirotw May 31, 2022
89687bf
fix volume value
ramirotw Jun 1, 2022
2ac4ab4
Merge remote-tracking branch 'origin/35-epic-home-page' into 39/token…
ramirotw Jun 1, 2022
41c622c
Fix tooltip + Add Total Volume column
matextrem Jun 2, 2022
8d0c5e9
remove the any cast
ramirotw Jun 3, 2022
51a96ce
Merge remote-tracking branch 'origin/39/tokens-table-subgraph' into 3…
ramirotw Jun 3, 2022
ef99846
expand timestamp window and always show 0% values
ramirotw Jun 3, 2022
4fa7764
format total volume column
ramirotw Jun 3, 2022
c732a03
replace function with nullish operator
ramirotw Jun 7, 2022
f4a1821
fix % difference value
ramirotw Jun 7, 2022
7b654a5
show 100% only when past value is 0
ramirotw Jun 7, 2022
dcc283c
Merge remote-tracking branch 'origin/35-epic-home-page' into 39/token…
ramirotw Jun 8, 2022
4e635d5
simplify function
ramirotw Jun 8, 2022
c5e1b82
improve tooltips
ramirotw Jun 8, 2022
5447a8a
fix pagination issue
ramirotw Jun 9, 2022
0910a28
reset table when network changes
ramirotw Jun 9, 2022
ca3ce2f
show price chart with a minimum of data points
ramirotw Jun 9, 2022
a3cd73b
fix token label on mobile
ramirotw Jun 9, 2022
e57e022
fix # position on mobile
ramirotw Jun 9, 2022
2d08cd5
remove vertical line from price chart
ramirotw Jun 9, 2022
c23546d
get priceUsd from the token entity
ramirotw Jun 9, 2022
5babd0e
refactor a bit getTokensHistoricalData function
ramirotw Jun 9, 2022
a463592
add page size selector back again
ramirotw Jun 10, 2022
934e751
fix native tokens not displayed correctly
ramirotw Jun 10, 2022
a80dafd
fix uppercase
ramirotw Jun 10, 2022
d1bf790
total volume lowercase
ramirotw Jun 10, 2022
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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 12
node-version: 16

- name: Set output of cache
id: yarn-cache
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 12
node-version: 16

- name: Load dependencies
id: cache-node-modules
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 12
node-version: 16

- name: Load dependencies
id: cache-node-modules
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 12
node-version: 16

- name: Load dependencies
id: cache-node-modules
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "src/index.js",
"sideEffects": false,
"engines": {
"node": "12"
"node": "16"
},
"scripts": {
"start": "npm run start:explorer",
Expand Down Expand Up @@ -52,7 +52,7 @@
"dependencies": {
"@amcharts/amcharts4": "^4.9.12",
"@apollo/client": "^3.1.5",
"@cowprotocol/cow-sdk": "^0.0.9",
"@cowprotocol/cow-sdk": "^0.0.12",
"@fortawesome/fontawesome-svg-core": "^1.2.26",
"@fortawesome/free-regular-svg-icons": "^5.12.0",
"@fortawesome/free-solid-svg-icons": "^5.15.4",
Expand Down Expand Up @@ -83,7 +83,7 @@
"eth-json-rpc-middleware": "^4.4.1",
"ethers": "^5.0.26",
"flexsearch": "^0.7.21",
"graphql": "^15.3.0",
"graphql": "^16.5.0",
"inter-ui": "^3.15.0",
"joi": "^17.2.0",
"json-rpc-engine": "5.3.0",
Expand Down Expand Up @@ -130,6 +130,7 @@
"@types/bn.js": "^4.11.6",
"@types/combine-reducers": "^1.0.0",
"@types/cytoscape": "^3.19.4",
"@types/cytoscape-popper": "^2.0.0",
"@types/enzyme": "^3.10.4",
"@types/enzyme-adapter-react-16": "^1.0.5",
"@types/flexsearch": "^0.7.3",
Expand All @@ -144,7 +145,6 @@
"@types/react-router-dom": "^5.1.3",
"@types/styled-components": "^5.0.1",
"@types/webpack-env": "^1.15.2",
"@types/cytoscape-popper": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^4.3.0",
"@typescript-eslint/parser": "^4.3.0",
"babel-jest": "^26.1.0",
Expand All @@ -168,7 +168,7 @@
"eslint-plugin-react": "^7.21.2",
"eslint-plugin-react-hooks": "^4.1.2",
"eslint-utils": ">=2.1.0",
"favicons-webpack-plugin": "^3.0.1",
"favicons-webpack-plugin": "^4.0.0",
"file-loader": "^6.0.0",
"fork-ts-checker-webpack-plugin": "^4.0.3",
"frontmatter-markdown-loader": "^3.2.1",
Expand Down
18 changes: 0 additions & 18 deletions src/api/operator/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,24 +84,6 @@ export type Trade = Pick<RawTrade, 'blockNumber' | 'logIndex' | 'owner' | 'txHas
surplusPercentage?: BigNumber
}

export type Token = {
id: number
name: string
symbol: string
totalVolumeUsd: string
firstTradeTimestamp: string
priceEth: string
priceUsd: string
last24hours: number
sevenDays: number
last7Days: {
currentVolume: number
changedVolume: number
values: Array<{ time: string; value: number }>
}
lastDayVolume: string
} & TokenErc20

export type WithNetworkId = { networkId: Network }

export type GetOrderParams = WithNetworkId & {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { VolumePeriod } from './VolumeChartWidget'
import { VolumeDataResponse } from './VolumeChart'

type RawVolumeItem = {
timestamp: string
timestamp: number
volumeUsd: string
}

Expand Down
Loading