Show individual NFT offer on the token page.
This would allow users to share links to NFT offers.
Also show the listing on the page immediately when the user creates a listing, instead of auto-routing to the slow-to-load NFT page.
Differential D17146
[Cashtab] Show NFT offer on token page Authored by bytesofman on Nov 15 2024, 23:45.
Details
Show individual NFT offer on the token page. This would allow users to share links to NFT offers. Also show the listing on the page immediately when the user creates a listing, instead of auto-routing to the slow-to-load NFT page. npm test
Diff Detail
Event TimelineComment Actions Build Bitcoin ABC Diffs / Diff Testing (cashtab-tests) failed.
Failed tests logs: ====== CashTab Unit Tests: <Token /> available actions rendered We can render an SLP1 NFT Parent token with a minted NFT in its collection ======
TestingLibraryElementError: Found multiple elements with the text: NFTs in this Collection
Here are the matching elements:
Ignored nodes: comments, script, style
<div
class="sc-gtfDJT eDDrRa"
>
NFTs in this Collection
</div>
Ignored nodes: comments, script, style
<div
class="sc-gtfDJT eDDrRa"
>
NFTs in this Collection
</div>
(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).
Ignored nodes: comments, script, style
<body>
<div>
<div
class="sc-ivVeuv fHRvPq"
>
<div
class="Toastify"
/>
<div
class="sc-cCbXAZ duJsQt"
>
<div
class="sc-fHSTwm cxpJKj"
>
<div
class="sc-cgHJcJ aiooe"
>
<img
alt="cashtab"
class="sc-hizQCF inqoGQ"
src="test-file-stub"
/>
</div>
<div
class="sc-kVrTmx ZRUlx"
>
<select
class="sc-ekkqgF hmTBrl"
data-testid="wallet-select"
id="wallets"
name="wallets"
>
<option
class="sc-iBmynh bRQLyW"
value="Token Test"
>
Token Test
</option>
</select>
<div
class="sc-jWojfa uPesV"
>
<button
aria-label="Copy ecash:qqq9f9z3uhpzkxrgdjkd7dxuuey7tmpmugpmnw0kue"
class="sc-kvZOFW liNaUH"
>
<svg
title="copy-paste"
/>
</button>
<div
class="sc-fhYwyz fpwrfn"
>
<div
class="sc-jzgbtB cdJgRi"
>
<input
checked=""
class="sc-CtfFt eXIHPX"
id="show-hide-balance"
name="show-hide-balance"
title="show-hide-balance"
type="checkbox"
/>
<label
class="sc-gJWqzi cInajG"
for="show-hide-balance"
>
<span
class="sc-rBLzX kkNQQW"
data-off=""
data-on=""
/>
<span
class="sc-bMvGRv kbAFcW"
/>
</label>
</div>
</div>
</div>
</div>
<div
class="sc-ccLTTT SlYAe"
title="Wallet Info"
>
<div
class="sc-jvEmr fzPGnp"
title="Balance in XEC"
>
9,970.81
XEC
</div>
<div
class="sc-hycgNl hvoCwn"
title="Balance in Local Currency"
>
$
0.30
USD
</div>
<p
class="sc-chAAoq cSPPxC"
title="Price in Local Currency"
>
1
XEC
=
0.00003000
USD
</p>
</div>
<div
class="sc-dRCTWM oXRxq"
>
<div
class="sc-iBEsjs ivzmun"
>
1
The Four Half-Coins of Jin-qua
(
4HC
)
</div>
<div
class="sc-RcBXQ hYSJYt"
title="Token Stats"
>
<div
class="sc-fZwumE fFOESu"
>
<button
class="sc-cooIXK cZeeyU"
>
<img
alt="icon for 12a049d0da64652b4e8db68b6052ad0cda43cf0269190fe81040bed65ca926a3"
height="128"
src="https://icons.etokens.cash/128/12a049d0da64652b4e8db68b6052ad0cda43cf0269190fe81040bed65ca926a3.png"
width="128"
/>
</button>
</div>
<div
class="sc-fZwumE fFOESu"
>
<div
class="sc-clNaTc kbrFRK"
>
<div
class="sc-etwtAo SIrdX"
>
Type:
</div>
<div
class="sc-fZwumE fFOESu"
>
<div
class="sc-kxynE ivrWtb"
>
NFT Collection
<button
aria-label="Click for more info about this token type"
class="sc-kvZOFW liNaUH"
>
<svg
title="More Info"
/>
</button>
</div>
...
at Object.getElementError (/work/cashtab/node_modules/@testing-library/dom/dist/config.js:37:19)
at getElementError (/work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:20:35)
at getMultipleElementsFoundError (/work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:23:10)
at /work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:55:13
at /work/cashtab/node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at Object.getByText (/work/cashtab/src/components/Etokens/__tests__/TokenActions.test.js:815:23)
====== CashTab Unit Tests: <Token /> available actions rendered We can list an SLP1 NFT ======
TestingLibraryElementError: Unable to find an element with the text: eCash NFT. NFT supply is always 1. This NFT may belong to an NFT collection.. 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 />
</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/Etokens/__tests__/TokenActions.test.js:901:20)Each failure log is accessible here:
| ||||||||||||||||||||