Skip to content
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

refresh token lists during session #4573

Draft
wants to merge 24 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c60a33a
add refresh interval data to `tokenListURIs.ts` file
emilydrakesmith Dec 31, 2024
1ac75cb
update annotations in `useTokens.ts` file
emilydrakesmith Dec 31, 2024
61b13ce
rescope fn `fetchAndFormatList()`
emilydrakesmith Dec 31, 2024
01d749f
retype `uri` param in fn `fetchAndFormatList()`
emilydrakesmith Dec 31, 2024
4aff7b0
add new logic to patch an updated list into local state
emilydrakesmith Dec 31, 2024
622837a
add local server for futa token list
benwolski Dec 31, 2024
e5dbd29
expand list patching logic to patch multiple lists in parallel
emilydrakesmith Dec 31, 2024
ffbdbec
Merge branch 'refresh-token-lists' of https://github.com/CrocSwap/amb…
emilydrakesmith Dec 31, 2024
3d7de6d
simplify fetching of futa list on interval
benwolski Dec 31, 2024
8c64138
Merge branch 'develop' into refresh-token-lists
benwolski Jan 1, 2025
4d836cc
Merge branch 'develop' into refresh-token-lists
benwolski Jan 2, 2025
aed9dd0
clean up FUTA token list refresh logic
emilydrakesmith Jan 2, 2025
8e95f76
Merge branch 'refresh-token-lists' of https://github.com/CrocSwap/amb…
emilydrakesmith Jan 2, 2025
0047587
add isFuta to TokenIF
benwolski Jan 2, 2025
7f25d4c
Merge branch 'develop' of https://github.com/CrocSwap/ambient-ts-app …
emilydrakesmith Jan 2, 2025
c1fc67e
add logic to return only FUTA tokens from universw
emilydrakesmith Jan 2, 2025
f3aaf97
refactor default token handling logic
emilydrakesmith Jan 2, 2025
bc64b56
Merge branch 'develop' into refresh-token-lists
benwolski Jan 2, 2025
f2dd9a3
float native token to top of FUTA token select modal
emilydrakesmith Jan 6, 2025
43239fc
Merge branch 'refresh-token-lists' of https://github.com/CrocSwap/amb…
emilydrakesmith Jan 6, 2025
d45cfc0
Merge branch 'develop' of https://github.com/CrocSwap/ambient-ts-app …
emilydrakesmith Jan 6, 2025
daef210
add defaultTokensAmbient export
benwolski Jan 6, 2025
d3dfd94
add special handling to get local token lists
emilydrakesmith Jan 6, 2025
54d2be2
eliminate dead space at top of token select modal
emilydrakesmith Jan 6, 2025
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
72 changes: 72 additions & 0 deletions mock/futa-token-list.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"futa-token-list": {
"name": "Futa Token List",
"logoURI": "https://ambient.finance/icons/ambient_icon_x180.png",
"timestamp": "2024-07-05T15:02:53.363Z",
"version": {
"major": 1,
"minor": 0,
"patch": 0
},
"tags": {},
"keywords": ["futa", "default"],
"tokens": [
{
"name": "new token11",
"address": "0x50bBA138A74C5e7326885De5090700626950d509",
"chainId": 11155111,
"decimals": 6,
"logoURI": "",
"symbol": "NEW11"
},
{
"name": "new token",
"address": "0x40bBA138A74C5e7326885De5090700626950d509",
"chainId": 11155111,
"decimals": 6,
"logoURI": "",
"symbol": "NEW9"
},
{
"name": "Wrapped BTC",
"address": "0xCA97CC9c1a1dfA54A252DaAFE9b5Cd1E16C81328",
"chainId": 11155111,
"decimals": 8,
"logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599/logo.png",
"symbol": "WBTC"
},
{
"name": "PEPE",
"address": "0x1230000000000000000000000000000000000000",
"symbol": "PEPE",
"decimals": 18,
"chainId": 11155111,
"logoURI": ""
},
{
"name": "JUNIOR",
"address": "0x2340000000000000000000000000000000000000",
"symbol": "JUNIOR",
"decimals": 18,
"chainId": 11155111,
"logoURI": ""
},
{
"name": "HELLO😊",
"address": "0x3450000000000000000000000000000000000000",
"symbol": "HELLO😊",
"decimals": 18,
"chainId": 11155111,
"logoURI": ""
},
{
"name": "EMILY",
"address": "0x4560000000000000000000000000000000000000",
"symbol": "EMILY",
"decimals": 18,
"chainId": 11155111,
"logoURI": ""
}
]
}
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@
"lint:fix": "eslint --fix \"src/**/*.{js,jsx,ts,tsx}\"",
"format": "prettier --write 'src/**/*.{js,jsx,ts,tsx,css,md,json}' --config ./.prettierrc",
"prepare": "husky",
"postbuild": "node generateManifest.js"
"postbuild": "node generateManifest.js",
"serve:token-list": "json-server mock/futa-token-list.json --port 3002"
},
"lint-staged": {
"*.{js,jsx,ts,tsx,json}": [
Expand Down Expand Up @@ -90,6 +91,7 @@
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^5.1.0",
"husky": "^9.1.7",
"json-server": "^1.0.0-beta.3",
"lint-staged": "^15.2.11",
"playwright": "^1.49.1",
"prettier": "^3.3.3",
Expand Down
70 changes: 0 additions & 70 deletions public/futa-token-list.json

This file was deleted.

Loading
Loading