Skip to content
Open
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
6 changes: 6 additions & 0 deletions .ipynb_checkpoints/Untitled-checkpoint.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 5
}
49 changes: 49 additions & 0 deletions Untitled.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "ab1de8b2-271b-497f-ac97-8d704907904a",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "617252eb-ec34-4037-84dc-38a156a21192",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "1705a97e-2963-4a9a-b3a5-addbc0fff832",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.1"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Binary file added file-00000000b53482468cb1a919f5cc14ff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/diffTokenLists.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function compareTokenInfoProperty(a: unknown, b: unknown): boolean {
if (a === b) return true;
if (typeof a !== typeof b) return false;
if (Array.isArray(a) && Array.isArray(b)) {
return a.every((el, i) => b[i] === el);
return a.length === b.length && a.every((el, i) => b[i] === el);
}
return false;
}
Expand Down
3 changes: 3 additions & 0 deletions src/tokens/tron/TPHjxcwuDiAJtnySMo99ou7Rbqo8cqVhsh.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"logoURI": "https://raw.githubusercontent.com/mohess6478/token-lists/main/src/assets/logos/TPHjxcwuDiAJtnySMo99ou7Rbqo8cqVhsh.png"
}
15 changes: 15 additions & 0 deletions test/diffTokenLists.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,21 @@ describe('#diffTokenLists', () => {
},
});
});

it('change tags length', () => {
expect(
diffTokenLists([tokenB, tokenA], [{ ...tokenA, tags: ['hello'] }])
).toEqual({
added: [],
removed: [tokenB],
changed: {
1: {
'0x0a': ['tags'],
},
},
});
});

it('remove tags', () => {
expect(
diffTokenLists([tokenB, tokenA], [{ ...tokenA, tags: undefined }])
Expand Down
Binary file added tmp/logo_original.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.