Skip to content

Commit 197605e

Browse files
authored
fix: only consider an update when token address and chainId match (#734)
1 parent 38dee4a commit 197605e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/scripts/workflow_helper.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import sys
21
import json
32
import os
4-
3+
import sys
54

65
LIST_PATH = os.environ["LIST_PATH"]
76

@@ -12,7 +11,7 @@ def handle_add_update_token(data):
1211

1312
for token in token_list["tokens"]:
1413
# update
15-
if token["address"].lower() == data["address"].lower():
14+
if token["address"].lower() == data["address"].lower() and token["chainId"] == int(data["chainId"]):
1615
token["address"] = data["address"].lower()
1716
token["symbol"] = data["symbol"]
1817
token["name"] = data["name"]

0 commit comments

Comments
 (0)