diff --git a/.ipynb_checkpoints/Untitled-checkpoint.ipynb b/.ipynb_checkpoints/Untitled-checkpoint.ipynb new file mode 100644 index 000000000..363fcab7e --- /dev/null +++ b/.ipynb_checkpoints/Untitled-checkpoint.ipynb @@ -0,0 +1,6 @@ +{ + "cells": [], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/Untitled.ipynb b/Untitled.ipynb new file mode 100644 index 000000000..f6718f47a --- /dev/null +++ b/Untitled.ipynb @@ -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 +} diff --git a/file-00000000b53482468cb1a919f5cc14ff.png b/file-00000000b53482468cb1a919f5cc14ff.png new file mode 100644 index 000000000..4c945269c Binary files /dev/null and b/file-00000000b53482468cb1a919f5cc14ff.png differ diff --git a/src/assets/logos/TPHjxcwuDiAJtnySMo99ou7Rbqo8cqVhsh.png b/src/assets/logos/TPHjxcwuDiAJtnySMo99ou7Rbqo8cqVhsh.png new file mode 100644 index 000000000..b8a048a2f Binary files /dev/null and b/src/assets/logos/TPHjxcwuDiAJtnySMo99ou7Rbqo8cqVhsh.png differ diff --git a/src/diffTokenLists.ts b/src/diffTokenLists.ts index e22872f9a..23c618f2f 100644 --- a/src/diffTokenLists.ts +++ b/src/diffTokenLists.ts @@ -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; } diff --git a/src/tokens/tron/TPHjxcwuDiAJtnySMo99ou7Rbqo8cqVhsh.json b/src/tokens/tron/TPHjxcwuDiAJtnySMo99ou7Rbqo8cqVhsh.json new file mode 100644 index 000000000..77d3439ff --- /dev/null +++ b/src/tokens/tron/TPHjxcwuDiAJtnySMo99ou7Rbqo8cqVhsh.json @@ -0,0 +1,3 @@ +{ + "logoURI": "https://raw.githubusercontent.com/mohess6478/token-lists/main/src/assets/logos/TPHjxcwuDiAJtnySMo99ou7Rbqo8cqVhsh.png" +} diff --git a/test/diffTokenLists.test.ts b/test/diffTokenLists.test.ts index 5e300ab2d..ab8fb751d 100644 --- a/test/diffTokenLists.test.ts +++ b/test/diffTokenLists.test.ts @@ -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 }]) diff --git a/tmp/logo_original.png b/tmp/logo_original.png new file mode 100644 index 000000000..4c945269c Binary files /dev/null and b/tmp/logo_original.png differ