Do not render entire tokenId in a link that is going to the tokenId. No one will read all 64 chars. Instead, abbreviate.
Add a break-all rule to prevent any overflow issues should they come up.
Differential D16017
[Cashtab] Fix airdrop tx render issue bytesofman on Apr 18 2024, 23:02. Authored by Tags None Subscribers None
Details
Do not render entire tokenId in a link that is going to the tokenId. No one will read all 64 chars. Instead, abbreviate. Add a break-all rule to prevent any overflow issues should they come up. npm test
Diff Detail
Event TimelineComment Actions Build Bitcoin ABC Diffs / Diff Testing (cashtab-tests) failed.
Failed tests logs: ====== CashTab Unit Tests: <Tx /> Received airdrop with msg (legacy push) with no token info in cache ====== TestingLibraryElementError: Unable to find an element with the text: bdb3b4215ca0622e0c4c07655522c376eaa891838a82f0217fa453bb0595a37c. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible. Ignored nodes: comments, script, style <body> <div> <div class="sc-bdVaJa jjgtxs" > <div class="sc-bwzfXH evareY" > <div class="sc-htpNat fTPTBn" type="Received" > <div class="sc-bxivhb cHJlww" > <svg title="tx-received" /> <div class="sc-EHOje eTNtAZ" > <div class="sc-gzVnrw heeZCw" > <div class="sc-bZQynM kOWhJU" > Received from <a class="sc-kGXeez fCnRQr" href="https://explorer.e.cash/address/ecash:qp36z7k8xt7k4l5xnxeypg5mfqeyvvyduu04m37fwd" rel="noreferrer" target="_blank" > qp3...fwd </a> </div> <div class="sc-hwwEjo cQMDVj" > <svg class="sc-kPVwWT jkJnoM" title="Finalized by Avalanche" viewBox="0 0 52 52" xmlns="http://www.w3.org/2000/svg" > <circle class="sc-kfGgVZ eVBTzZ" cx="26" cy="26" fill="none" r="25" /> <path class="sc-esjQYD cnXDYD" d="M14.1 27.2l7.1 7.2 16.7-16.8" fill="none" /> </svg> </div> </div> <div class="sc-htoDjs kcOqHg" > Oct 1, 2022, 23:36:08 </div> </div> </div> <div class="sc-dnqmqq cGIJgt" > <div class="sc-iwsKbI bFYjcF" > 5.69 XEC </div> <div class="sc-gZMcBi duMjuZ" > $ 0.00 </div> </div> </div> <div class="sc-kpOJdX kTGcaF" > <div class="sc-ckVGcZ duFkoQ" > <svg title="tx-airdrop" /> <div class="sc-dxgOiQ cclswX" > Airdrop to holders of <a class="sc-jWBwVP fDrbnp" href="https://explorer.e.cash/tx/bdb3b4215ca0622e0c4c07655522c376eaa891838a82f0217fa453bb0595a37c" rel="noreferrer" target="_blank" > bdb...37c </a> </div> </div> <img alt="icon for bdb3b4215ca0622e0c4c07655522c376eaa891838a82f0217fa453bb0595a37c" height="32" src="https://icons.etokens.cash/32/bdb3b4215ca0622e0c4c07655522c376eaa891838a82f0217fa453bb0595a37c.png" width="32" /> <div class="sc-jKJlTe itNDJR" > evc token service holders air drop ❤ </div> </div> </div> <div class="sc-jTzLTM btsHzU" > <div class="sc-fjdhpX dnUlwb" > <div class="sc-jzJRlG gEyaXg" > Avalanche Finalized </div> <div class="sc-hwwEjo cQMDVj" > <svg class="sc-kPVwWT hxPyUc" title="Finalized by Avalanche" viewBox="0 0 52 52" xmlns="http://www.w3.org/2000/svg" > <circle class="sc-kfGgVZ eVBTzZ" cx="26" cy="26" fill="none" r="25" /> <path class="sc-esjQYD cnXDYD" d="M14.1 27.2l7.1 7.2 16.7-16.8" fill="none" /> </svg> </div> </div> <div class="sc-cSHVUG gDEcVa" > <div class="sc-fAjcbJ dKNdXN" > <button class="sc-kAzzGY jjfqUh" > <svg title="copy-paste" /> </button> </div> <a class="sc-chPdSV fCIcLj" href="https://explorer.e.cash/tx/6e3baf279770c3ed84981c414f433e654cdc1b12df3024051f0f7c215a13dca9" rel="noreferrer" target="_blank" > <svg class="sc-brqgnP czEshA" /> </a> <a class="sc-chPdSV fCIcLj" href="https://blockchair.com/ecash/transaction/6e3baf279770c3ed84981c414f433e654cdc1b12df3024051f0f7c215a13dca9.pdf" rel="noreferrer" target="_blank" > <svg class="sc-cMljjf hlUukk" /> </a> <button class="sc-kAzzGY jjfqUh" > <svg title="add-contact" /> </button> </div> </div> </div> , </div> </body> at Object.getElementError (/work/cashtab/node_modules/@testing-library/dom/dist/config.js:37:19) at /work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:76:38 at /work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:52:17 at /work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:95:19 at Object.getByText (/work/cashtab/src/components/Home/Tx/__tests__/index.test.js:869:20) at Promise.then.completed (/work/cashtab/node_modules/jest-circus/build/utils.js:298:28) at new Promise (<anonymous>) at callAsyncCircusFn (/work/cashtab/node_modules/jest-circus/build/utils.js:231:10) at _callCircusTest (/work/cashtab/node_modules/jest-circus/build/run.js:316:40) at processTicksAndRejections (node:internal/process/task_queues:95:5) at _runTest (/work/cashtab/node_modules/jest-circus/build/run.js:252:3) at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:126:9) at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:121:9) at run (/work/cashtab/node_modules/jest-circus/build/run.js:71:3) at runAndTransformResultsToJestFormat (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21) at jestAdapter (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19) at runTestInternal (/work/cashtab/node_modules/jest-runner/build/runTest.js:367:16) at runTest (/work/cashtab/node_modules/jest-runner/build/runTest.js:444:34) at Object.worker (/work/cashtab/node_modules/jest-runner/build/testWorker.js:106:12) Each failure log is accessible here: Comment Actions Build Bitcoin ABC Diffs / Diff Testing (cashtab-tests) failed.
Failed tests logs: ====== CashTab Unit Tests: <Tx /> Received airdrop with msg (legacy push) with no token info in cache ====== TestingLibraryElementError: Unable to find an element with the text: bdb3b4215ca0622e0c4c07655522c376eaa891838a82f0217fa453bb0595a37c. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible. Ignored nodes: comments, script, style <body> <div> <div class="sc-bdVaJa jjgtxs" > <div class="sc-bwzfXH evareY" > <div class="sc-htpNat fTPTBn" type="Received" > <div class="sc-bxivhb cHJlww" > <svg title="tx-received" /> <div class="sc-EHOje eTNtAZ" > <div class="sc-gzVnrw heeZCw" > <div class="sc-bZQynM kOWhJU" > Received from <a class="sc-kGXeez fCnRQr" href="https://explorer.e.cash/address/ecash:qp36z7k8xt7k4l5xnxeypg5mfqeyvvyduu04m37fwd" rel="noreferrer" target="_blank" > qp3...fwd </a> </div> <div class="sc-hwwEjo cQMDVj" > <svg class="sc-kPVwWT jkJnoM" title="Finalized by Avalanche" viewBox="0 0 52 52" xmlns="http://www.w3.org/2000/svg" > <circle class="sc-kfGgVZ eVBTzZ" cx="26" cy="26" fill="none" r="25" /> <path class="sc-esjQYD cnXDYD" d="M14.1 27.2l7.1 7.2 16.7-16.8" fill="none" /> </svg> </div> </div> <div class="sc-htoDjs kcOqHg" > Oct 1, 2022, 23:36:08 </div> </div> </div> <div class="sc-dnqmqq cGIJgt" > <div class="sc-iwsKbI bFYjcF" > 5.69 XEC </div> <div class="sc-gZMcBi duMjuZ" > $ 0.00 </div> </div> </div> <div class="sc-kpOJdX TQvxM" > <div class="sc-ckVGcZ duFkoQ" > <svg title="tx-airdrop" /> <div class="sc-dxgOiQ cclswX" > Airdrop to holders of <a class="sc-jWBwVP fDrbnp" href="https://explorer.e.cash/tx/bdb3b4215ca0622e0c4c07655522c376eaa891838a82f0217fa453bb0595a37c" rel="noreferrer" target="_blank" > bdb...37c </a> </div> </div> <img alt="icon for bdb3b4215ca0622e0c4c07655522c376eaa891838a82f0217fa453bb0595a37c" height="32" src="https://icons.etokens.cash/32/bdb3b4215ca0622e0c4c07655522c376eaa891838a82f0217fa453bb0595a37c.png" width="32" /> <div class="sc-jKJlTe itNDJR" > evc token service holders air drop ❤ </div> </div> </div> <div class="sc-jTzLTM btsHzU" > <div class="sc-fjdhpX dnUlwb" > <div class="sc-jzJRlG gEyaXg" > Avalanche Finalized </div> <div class="sc-hwwEjo cQMDVj" > <svg class="sc-kPVwWT hxPyUc" title="Finalized by Avalanche" viewBox="0 0 52 52" xmlns="http://www.w3.org/2000/svg" > <circle class="sc-kfGgVZ eVBTzZ" cx="26" cy="26" fill="none" r="25" /> <path class="sc-esjQYD cnXDYD" d="M14.1 27.2l7.1 7.2 16.7-16.8" fill="none" /> </svg> </div> </div> <div class="sc-cSHVUG gDEcVa" > <div class="sc-fAjcbJ dKNdXN" > <button class="sc-kAzzGY jjfqUh" > <svg title="copy-paste" /> </button> </div> <a class="sc-chPdSV fCIcLj" href="https://explorer.e.cash/tx/6e3baf279770c3ed84981c414f433e654cdc1b12df3024051f0f7c215a13dca9" rel="noreferrer" target="_blank" > <svg class="sc-brqgnP czEshA" /> </a> <a class="sc-chPdSV fCIcLj" href="https://blockchair.com/ecash/transaction/6e3baf279770c3ed84981c414f433e654cdc1b12df3024051f0f7c215a13dca9.pdf" rel="noreferrer" target="_blank" > <svg class="sc-cMljjf hlUukk" /> </a> <button class="sc-kAzzGY jjfqUh" > <svg title="add-contact" /> </button> </div> </div> </div> , </div> </body> at Object.getElementError (/work/cashtab/node_modules/@testing-library/dom/dist/config.js:37:19) at /work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:76:38 at /work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:52:17 at /work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:95:19 at Object.getByText (/work/cashtab/src/components/Home/Tx/__tests__/index.test.js:869:20) at Promise.then.completed (/work/cashtab/node_modules/jest-circus/build/utils.js:298:28) at new Promise (<anonymous>) at callAsyncCircusFn (/work/cashtab/node_modules/jest-circus/build/utils.js:231:10) at _callCircusTest (/work/cashtab/node_modules/jest-circus/build/run.js:316:40) at processTicksAndRejections (node:internal/process/task_queues:95:5) at _runTest (/work/cashtab/node_modules/jest-circus/build/run.js:252:3) at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:126:9) at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:121:9) at run (/work/cashtab/node_modules/jest-circus/build/run.js:71:3) at runAndTransformResultsToJestFormat (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21) at jestAdapter (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19) at runTestInternal (/work/cashtab/node_modules/jest-runner/build/runTest.js:367:16) at runTest (/work/cashtab/node_modules/jest-runner/build/runTest.js:444:34) at Object.worker (/work/cashtab/node_modules/jest-runner/build/testWorker.js:106:12) Each failure log is accessible here: |