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

fix(core): update ethereum chains data and add erc-20 token POL support #183

Merged
merged 2 commits into from
Sep 6, 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
2 changes: 1 addition & 1 deletion common/defs/ethereum/chains
Submodule chains updated 1943 files
26 changes: 26 additions & 0 deletions common/defs/evm_tokens/1.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,32 @@
"__v": 0,
"marketCap": "6126893790.915463"
},
{
"_id": "62e8a3d28edb7c3c91a5586b",
"name": "Polygon",
"symbol": "POL",
"address": "0x455e53CBB86018Ac2B8092FdCd39d8444aFFC3F6",
"decimals": 18,
"logoURI": "https://common.onekey-asset.com/token/evm-1/0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0.jpg",
"impl": "evm",
"status": "LISTED",
"verified": true,
"security": false,
"addToIndex": false,
"chainId": "1",
"source": [
"sushi",
"Uniswap Labs Default",
"Coingecko"
],
"checked": true,
"coingeckoId": "matic-network",
"swftId": "MATIC",
"createdAt": "2022-08-02T04:10:58.228Z",
"updatedAt": "2022-11-16T13:02:51.357Z",
"__v": 0,
"marketCap": "6126893790.915463"
},
{
"_id": "62e8a3d28edb7c3c91a5585f",
"name": "Wrapped BTC",
Expand Down
18 changes: 9 additions & 9 deletions common/defs/support.json
Original file line number Diff line number Diff line change
Expand Up @@ -4744,7 +4744,7 @@
"eth:EWT": "2.3.5",
"eth:EXP": "2.0.7",
"eth:FETH": "2.4.2",
"eth:FIL": "4.3.0",
"eth:FIL:314": "4.3.0",
"eth:FIN": "2.3.5",
"eth:FLR": "2.3.7",
"eth:FSN": "2.4.2",
Expand All @@ -4758,7 +4758,7 @@
"eth:GT": "2.4.2",
"eth:GooD": "2.4.2",
"eth:HAIC": "2.4.2",
"eth:HO": "2.4.4",
"eth:HO:1280": "2.4.4",
"eth:HOP": "2.4.4",
"eth:HPB": "2.1.1",
"eth:HT": "2.3.7",
Expand All @@ -4772,12 +4772,12 @@
"eth:KCS": "2.4.2",
"eth:KLAY": "2.3.7",
"eth:KTO:2559": "2.4.2",
"eth:L1": "2.4.4",
"eth:L1:29": "2.4.4",
"eth:L99": "2.4.3",
"eth:LA": "2.4.4",
"eth:LISINSKI": "2.3.5",
"eth:MATH": "2.3.7",
"eth:MATIC": "2.3.5",
"eth:POL": "2.3.5",
"eth:META": "2.1.1",
"eth:METIS": "2.4.4",
"eth:MINTME": "2.4.2",
Expand All @@ -4803,7 +4803,7 @@
"eth:ONE:1666600003": "2.3.7",
"eth:ONG": "2.4.2",
"eth:OY": "2.4.4",
"eth:PALM": "2.4.3",
"eth:PALM:11297108109": "2.4.3",
"eth:PETH": "2.4.2",
"eth:PHT": "2.3.5",
"eth:PHX": "2.4.4",
Expand All @@ -4812,7 +4812,7 @@
"eth:PLS": "2.4.3",
"eth:POA": "2.3.5",
"eth:POLIS": "2.4.4",
"eth:POP": "2.4.3",
"eth:POP:1213": "2.4.3",
"eth:PRB": "2.4.4",
"eth:QKC:100000": "2.4.2",
"eth:QKC:100001": "2.4.2",
Expand Down Expand Up @@ -4843,15 +4843,15 @@
"eth:SPOA": "2.4.4",
"eth:SRN": "2.4.3",
"eth:Seele": "2.4.4",
"eth:TAO": "2.3.5",
"eth:TAO:558": "2.3.5",
"eth:TBG": "2.3.7",
"eth:TCH": "2.3.5",
"eth:TCLO": "2.3.5",
"eth:TELE:8000": "2.4.4",
"eth:TETC": "2.3.5",
"eth:TFI": "2.3.7",
"eth:TLOS:40": "2.4.2",
"eth:TOMO:88": "2.4.4",
"eth:VIC": "2.4.4",
"eth:TOYS": "2.3.7",
"eth:TPEP": "2.3.5",
"eth:TSF": "2.3.5",
Expand Down Expand Up @@ -4901,7 +4901,7 @@
"eth:tKOT": "2.3.5",
"eth:tKOV": "2.0.7",
"eth:tMATH": "2.3.7",
"eth:tMATIC": "2.3.5",
"eth:tMATIC:80001": "2.3.5",
"eth:tMETC": "2.3.5",
"eth:tNEW": "2.3.7",
"eth:tNRG": "2.3.5",
Expand Down
1 change: 1 addition & 0 deletions common/tools/coin_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ def _load_btc_coins() -> Coins:
}
EVM_ICON_NAME_OVERRIDE = {
10: "oeth",
137: "matic",
288: "boba",
314: "filecoin",
324: "zksync-era",
Expand Down
34 changes: 17 additions & 17 deletions core/src/apps/ethereum/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def _networks_iterator() -> Iterator[NetworkInfoTuple]:
6, # chain_id
1, # slip44
"tKOT", # symbol
"Ethereum Classic Testnet Kotti", # name
"Kotti Testnet", # name
"evm-tkot.png", # name
0x969696, # primary_color
)
Expand Down Expand Up @@ -200,7 +200,7 @@ def _networks_iterator() -> Iterator[NetworkInfoTuple]:
16, # chain_id
1, # slip44
"tCFLR", # symbol
"Flare Testnet Coston", # name
"Songbird Testnet Coston", # name
"evm-tcflr.png", # name
0x969696, # primary_color
)
Expand Down Expand Up @@ -264,15 +264,15 @@ def _networks_iterator() -> Iterator[NetworkInfoTuple]:
30, # chain_id
137, # slip44
"RBTC", # symbol
"RSK", # name
"Rootstock", # name
"evm-rbtc.png", # name
0xD2D2D2, # primary_color
)
yield (
31, # chain_id
1, # slip44
"tRBTC", # symbol
"RSK Testnet", # name
"Rootstock Testnet", # name
"evm-trbtc.png", # name
0x969696, # primary_color
)
Expand Down Expand Up @@ -312,15 +312,15 @@ def _networks_iterator() -> Iterator[NetworkInfoTuple]:
44, # chain_id
60, # slip44
"CRAB", # symbol
"Darwinia Crab Network", # name
"Crab Network", # name
"evm-crab.png", # name
0xD2D2D2, # primary_color
)
yield (
50, # chain_id
60, # slip44
"XDC", # symbol
"XinFin XDC Network", # name
"XDC Network", # name
"evm-xdc.png", # name
0xD2D2D2, # primary_color
)
Expand Down Expand Up @@ -384,15 +384,15 @@ def _networks_iterator() -> Iterator[NetworkInfoTuple]:
62, # chain_id
1, # slip44
"TETC", # symbol
"Ethereum Classic Testnet Morden", # name
"Morden Testnet", # name
"evm-tetc.png", # name
0x969696, # primary_color
)
yield (
63, # chain_id
1, # slip44
"tMETC", # symbol
"Ethereum Classic Testnet Mordor", # name
"Mordor Testnet", # name
"evm-tmetc.png", # name
0x969696, # primary_color
)
Expand Down Expand Up @@ -479,9 +479,9 @@ def _networks_iterator() -> Iterator[NetworkInfoTuple]:
yield (
88, # chain_id
889, # slip44
"TOMO", # symbol
"TomoChain", # name
"evm-tomo.png", # name
"VIC", # symbol
"Viction", # name
"evm-vic.png", # name
0xD2D2D2, # primary_color
)
yield (
Expand Down Expand Up @@ -607,7 +607,7 @@ def _networks_iterator() -> Iterator[NetworkInfoTuple]:
yield (
137, # chain_id
966, # slip44
"MATIC", # symbol
"POL", # symbol
"Polygon", # name
"evm-matic.png", # name
0x8247E5, # primary_color
Expand Down Expand Up @@ -760,7 +760,7 @@ def _networks_iterator() -> Iterator[NetworkInfoTuple]:
324, # chain_id
60, # slip44
"ETH", # symbol
"zkSync Era", # name
"zkSync", # name
"evm-zksync-era.png", # name
0xFFFFFF, # primary_color
)
Expand Down Expand Up @@ -920,7 +920,7 @@ def _networks_iterator() -> Iterator[NetworkInfoTuple]:
1001, # chain_id
1, # slip44
"tKLAY", # symbol
"Klaytn Testnet Baobab", # name
"Kaia Testnet Kairos", # name
"evm-tklay.png", # name
0x969696, # primary_color
)
Expand Down Expand Up @@ -1054,7 +1054,7 @@ def _networks_iterator() -> Iterator[NetworkInfoTuple]:
)
yield (
1287, # chain_id
60, # slip44
1, # slip44
"DEV", # symbol
"Moonbase Alpha", # name
"evm-dev.png", # name
Expand Down Expand Up @@ -1216,7 +1216,7 @@ def _networks_iterator() -> Iterator[NetworkInfoTuple]:
8217, # chain_id
8217, # slip44
"KLAY", # symbol
"Klaytn", # name
"Kaia", # name
"evm-klay.png", # name
0xD2D2D2, # primary_color
)
Expand Down Expand Up @@ -1470,7 +1470,7 @@ def _networks_iterator() -> Iterator[NetworkInfoTuple]:
)
yield (
78110, # chain_id
60, # slip44
1, # slip44
"FIN", # symbol
"Firenze test network", # name
"evm-fin.png", # name
Expand Down
6 changes: 6 additions & 0 deletions core/src/apps/ethereum/tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,12 @@ def _token_iterator(chain_id: int) -> Iterator[tuple[bytes, str, int, str]]:
18,
"OMGToken",
)
yield ( # address, symbol, decimals, name
b"\x45\x5e\x53\xcb\xb8\x60\x18\xac\x2b\x80\x92\xfd\xcd\x39\xd8\x44\x4a\xff\xc3\xf6",
"POL",
18,
"Polygon",
)
yield ( # address, symbol, decimals, name
b"\x95\xad\x61\xb0\xa1\x50\xd7\x92\x19\xdc\xf6\x4e\x1e\x6c\xc0\x1f\x0b\x64\xc4\xce",
"SHIB",
Expand Down
2 changes: 1 addition & 1 deletion core/src/trezor/lvglui/i18n/locales/de.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
"Falscher Paarungscode, versuchen Sie es erneut.",
"{} Sekunden",
"Benutzerdefiniert",
"Daten anzeigen",
"Datenansicht",
"Größe",
"Daten",
"Möchten Sie Ihr Gerät wirklich nach {} automatisch sperren lassen?",
Expand Down
2 changes: 1 addition & 1 deletion core/src/trezor/lvglui/i18n/locales/fr.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
"Code de paire incorrect, réessayez.",
"{} secondes",
"Personnalisé",
"Voir les données",
"Voir données",
"Taille",
"Données",
"Voulez-vous vraiment verrouiller automatiquement votre appareil après {} ?",
Expand Down
2 changes: 1 addition & 1 deletion core/src/trezor/lvglui/i18n/locales/it.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
"Codice di accoppiamento errato, riprovare.",
"{} secondi",
"Costume",
"Visualizza i dati",
"Visualizza dati",
"Dimensione",
"Dati",
"Si vuole davvero bloccare automaticamente il dispositivo dopo {}?",
Expand Down
2 changes: 1 addition & 1 deletion core/src/trezor/lvglui/i18n/locales/pt_br.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
"Código de par incorreto, tente novamente.",
"{} segundos",
"Personalizado",
"Visualizar Dados",
"Ver Dados",
"Tamanho",
"Data",
"Você realmente quer bloquear automaticamente seu dispositivo após {}?",
Expand Down
2 changes: 1 addition & 1 deletion core/src/trezor/lvglui/i18n/locales/ru.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
"Неверный код пары, попробуйте еще раз.",
"{} секунды",
"Пользовательский",
"Просмотр данных",
"Просмотр",
"Размер",
"Данные",
"Вы действительно хотите автоматически блокировать устройство после {}?",
Expand Down
2 changes: 1 addition & 1 deletion core/src/trezor/lvglui/scrs/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def __init__(
self.show_full_message = NormalButton(
self.item_message.content, _(i18n_keys.BUTTON__VIEW_DATA)
)
self.show_full_message.set_size(185, 77)
self.show_full_message.set_size(lv.SIZE.CONTENT, 77)
self.show_full_message.add_style(
StyleWrapper().text_font(font_GeistSemiBold26), 0
)
Expand Down
Loading