Let users inspect the full destination cashaddr on the send
screen and on confirmation modals. An eye icon expands the usual
preview and highlights the checksum plus a matching payload prefix
in ecash blue.
Details
- Reviewers
Fabien - Group Reviewers
Restricted Project - Commits
- rABC8f50730cd5a7: [Cashtab] Add eye toggle to reveal full send addresses
- cd cashtab && npm test -- --watchAll=false src/helpers/__tests__/index.test.js src/components/Common/__tests__/RevealableAddress.test.tsx src/components/Send/__tests__/SendXec.test.js src/components/Send/__tests__/SendByUrlParams.test.js src/components/Send/helpers/recipientResolve.test.ts src/components/Etokens/__tests__/Token.test.tsx src/components/Etokens/__tests__/TokenActions.test.js
- On Send, enter a raw address; tap the eye to reveal the full address with blue start/checksum
- Enable send confirmations in Settings; tap Send and confirm the modal has the same toggle
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Build Bitcoin ABC Diffs / Diff Testing (ai-review) passed.
CodeRabbit Review
Diff : committed changes only
Compare : HEAD → master
Directory : work
────────────────────────────────────────
(\(\
(• .•) Performing code review exorcisms to the eerie strains of Tubular Bells.
────────────────────────────────────────────────────────────────────────
major [Functional Correctness]
→ ]8;;vscode://file//work/cashtab/src/components/Send/SendXec.tsx:3088cashtab/src/components/Send/SendXec.tsx:3088-3090]8;;
Include BIP21 multiple-output sends in confirmSendIsMulti.
A BIP21 XEC send with additional outputs does not set
isOneToManyXECSend. The confirmation modal then shows the first address
as a single recipient. This conflicts with the transaction that will send
to multiple recipients.
Include isBip21MultipleOutputsSafe(parsedAddressInput) in this
condition. Add a confirmation-modal test for a BIP21 URI with additional
outputs.
Proposed fix
const confirmSendIsMulti =
(isTokenMode && selectedTokenId && isOneToManyTokenSend) ||
- isOneToManyXECSend;
+ isOneToManyXECSend ||
+ isBip21MultipleOutputsSafe(parsedAddressInput);────────────────────────────────────────
Review complete
1 finding ✔
Major 1
8 files reviewed:
- cashtab/src/components/Common/RevealableAddress.tsx
- cashtab/src/components/Common/__tests__/RevealableAddress.test.tsx
- cashtab/src/components/Etokens/Token/index.tsx
- cashtab/src/components/Send/SendRecipientInput.tsx
- cashtab/src/components/Send/SendXec.tsx
- cashtab/src/components/Send/__tests__/SendXec.test.js
- cashtab/src/helpers/__tests__/index.test.js
- cashtab/src/helpers/index.ts
────────────────────────────────────────
Print all AI prompts: coderabbit review --show-prompts
Failed tests logs:
====== CashTab Unit Tests: <Configure /> Setting "Send Confirmations" settings will show send confirmations ======
Error: Unable to find an element with the text: Send 55 XEC to qph...72y. 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-cZLAbK fKlxtQ"
>
<section
aria-atomic="false"
aria-label="Notifications"
aria-live="polite"
aria-relevant="additions text"
class="Toastify"
/>
<div
class="sc-iVOTot fbzaAy"
>
<div
class="sc-kOCNXg iGOMNA"
>
<div
class="sc-ccXozh jhIpsy"
>
<div
class="sc-kIWQTW eDECcr"
title="Wallet Info"
>
<div
class="sc-jOVcOr caHYTl"
>
<div
class="sc-hkaZBZ eezOaP"
title="Price in Local Currency"
>
1
XEC
=
0.00003000
USD
</div>
<div
class="sc-RWGNv cyvoDa"
>
<div
class="sc-jOBXIr tdIlu"
>
<label
class="sc-ePAWwb kcOzhh"
>
<input
checked=""
class="sc-fObBmV gopYxP"
type="checkbox"
/>
<div
class="sc-ldcLGC ctpAnv"
>
<svg
fill="currentColor"
title="Visible"
/>
</div>
</label>
<button
aria-label="Copy ecash:qqa9lv3kjd8vq7952p7rq0f6lkpqvlu0cydvxtd70g"
class="sc-jbKcbu dkVUbc"
>
<svg
title="copy-paste"
/>
</button>
<a
aria-label="Settings"
class="sc-dzOgQY eCFfkd"
data-discover="true"
href="/configure"
>
<svg
title="Settings"
/>
</a>
</div>
<select
class="sc-gCUMDz lbcssv"
data-testid="wallet-select"
id="wallets"
name="wallets"
>
<option
class="sc-dTsoBL hidgbH"
value="ecash:qqa9lv3kjd8vq7952p7rq0f6lkpqvlu0cydvxtd70g"
>
Transaction Fixtures
</option>
</select>
</div>
</div>
<div
class="sc-imapFV bYfPLr"
>
<div
class="sc-fATqzn dDIUxp"
>
<div
aria-label="Toggle XEC and XECX balances"
class="sc-hqGPoI cSdMQY"
data-tooltip-html="<div style=\"display:grid;grid-template-columns:max-content auto;column-gap:0.35em;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-variant-numeric:tabular-nums\"><span style=\"text-align:right\">9,513.12</span><span>XEC</span><span style=\"text-align:right\">0.00</span><span>XECX</span></div>"
data-tooltip-id="cashtab-tooltip"
data-tooltip-place="bottom"
role="button"
tabindex="0"
>
<div
class="sc-iWadT cwueXo"
>
<svg />
eCash
<span
class="sc-ZUflv gTkidS"
>
XEC
</span>
</div>
<div
class="sc-kDgGX kfeCTw"
>
<div
class="sc-hPeUyl gyOJfG"
title="Balance XEC"
>
9,513.12
</div>
<div
class="sc-cAJUJo iDazsc"
title="Staked"
>
0%
<a
class="sc-cmUJln bLCxwQ"
data-discover="true"
href="/token/c67bf5c2b6d91cfb46a5c1772582eff80d88686887be10aa63b0945479cf4ed4"
>
staked
</a>
<span
class="sc-gYtlsd fnlYsA"
title="XECX APY"
>
4.01% APY
</span>
</div>
</div>
<div
class="sc-esoVGF lbRiaK"
title="Balance XEC Fiat"
>
$
0.29
USD
</div>
</div>
<a
class="sc-jbWsrJ gmGElB"
data-discover="true"
href="/token/0387947fd575db4fb19a3e322f635dec37fd192b5941625b66bc4b2c3008cbf0"
tokenlabel="USD"
>
<div
class="sc-iWadT cwueXo"
>
<svg />
USD
</div>
<div
class="sc-hPeUyl gyOJfG"
title="Balance USD"
>
$0.0000
</div>
<div
class="sc-cAJUJo iDazsc"
title="Firma APY"
>
6.29% APY
</div>
</a>
</div>
</div>
</div>
<div
class="sc-fyjYeE xLnKa"
>
<div
class="sc-kQsIoO iKgwem"
>
<div
class="sc-jzgbtB knnvkd"
>
<a
class="sc-gJWqzi beFTem"
data-discover="true"
href="/receive"
>
<svg />
<span>
Receive
</span>
</a>
<a
class="sc-gJWqzi jqfjXr"
data-discover="true"
href="/send"
>
<svg />
<span>
Send
</span>
</a>
<a
class="sc-gJWqzi beFTem"
data-discover="true"
href="/send?mode=token"
>
<svg />
<span>
Send Token
</span>
</a>
</div>
<div
class="sc-gPzReC CQxUu"
>
<div
class="sc-btzYZH gfEyiI"
>
<button
class="sc-dfVpRl jqApwu"
>
<svg
fill="currentColor"
height="15"
title="Close"
width="15"
/>
</button>
<div
class="sc-bYSBpT tKuqN"
>
<div
class="sc-lhVmIH hIFNiM"
>
Confirm Send
</div>
<div
class="sc-elJkPf iiyJZy"
>
Send 55 XEC
</div>
<div
class="sc-fZwumE hkONSZ"
>
<span
class="sc-fQejPQ lkyjYD"
>
qph...72y
</span>
<button
aria-label="Show full address"
aria-pressed="false"
class="sc-etwtAo jhMcAF"
title="Show full address"
type="button"
>
<svg
fill="currentColor"
title="Visible"
/>
</button>
</div>
</div>
<div
class="sc-jtRfpW bATbiB"
>
<button
aria-label="OK"
class="sc-kTUwUJ sc-dqBHgY hjxIuK"
>
OK
</button>
<button
class="sc-kTUwUJ sc-gxMtzJ kuTUTo"
>
Cancel
</button>
</div>
</div>
<div
class="sc-gzOgki fkWggE"
/>
<div
class="sc-kcDeIU bfAsZM"
>
<div
class="sc-gVLVqr itFlLl"
>
<div
class="sc-exkUMo hvDdzA"
>
<div
class="sc-jXQZqI kmwhEZ"
>
<div
aria-label="Recipient qph...72y"
class="sc-gtfDJT jhkaVx"
role="status"
>
<div
class="sc-jtRlXQ hIaCnb"
/>
<div
class="sc-fOICqy dcipHF"
>
<div
class="sc-fZwumE lksUNC"
>
<span
class="sc-fQejPQ lkyjYD"
>
qph...72y
</span>
<button
aria-label="Show full address"
aria-pressed="false"
class="sc-etwtAo jhMcAF"
title="Show full address"
type="button"
>
<svg
fill="currentColor"
title="Visible"
/>
</button>
</div>
</div>
<button
aria-label="Clear recipient"
class="sc-jeCdPy bgRjhi"
title="Clear recipient"
type="button"
>
×
</button>
</div>
<div
class="sc-eInJlc eBxIRB"
/>
</div>
<div
class="sc-kIPQKe kuTTGg"
>
<div
class="sc-ibxdXY hYlRHn"
>
<input
autocapitalize="off"
autocomplete="off"
autocorrect="off"
class="sc-RefOD sc-eTuwsz dMnHBd"
inputmode="decimal"
name="amount"
placeholder="Amount"
spellcheck="false"
type="text"
value="55"
/>
<select
class="sc-iQNlJl sc-bsbRJL cyCAuf"
data-testid="currency-select-dropdown"
>
<option
class="sc-cMhqgX cLyQTk"
data-testid="xec-option"
value="XEC"
>
XEC
</option>
<option
class="sc-cMhqgX cLyQTk"
data-testid="fiat-option"
value="USD"
>
USD
</option>
</select>
<button
class="sc-gwVKww VYhcD"
>
max
</button>
</div>
<div
class="sc-iuJeZd dapxNA"
/>
</div>
</div>
</div>
<div
class="sc-cBdUnI dXXEZn"
>
<div
class="sc-kIPQKe kuTTGg"
>
<div
class="sc-eXEjpC bgvBTk"
>
Send to many
</div>
<textarea
autocapitalize="off"
autocomplete="off"
autocorrect="off"
class="sc-bwCtUz dqHDvy"
height="142"
name="multiAddressInput"
placeholder="One address & amount per line, separated by comma
e.g.
ecash:qpatql05s9jfavnu0tv6lkjjk25n6tmj9gkpyrlwu8,500
ecash:qzvydd4n3lm3xv62cx078nu9rg0e3srmqq0knykfed,700"
spellcheck="false"
/>
<div
class="sc-hORach jpfYld"
>
<div
class="sc-bMVAic UgWSd"
/>
</div>
</div>
</div>
</div>
<div
class="sc-jrIrqw cvcKqM"
>
<div
class="sc-iybRtq esBgGk"
>
<button
class="sc-iQtOjA ignBOv"
type="button"
>
Advanced
<svg
class="sc-fyjhYU iWlFlC"
/>
</button>
</div>
</div>
<div
class="sc-ugnQR drgwoy"
>
<div
class="sc-eIHaNI lglxQj"
>
Sending
</div>
<div
class="sc-eTpRJs cSLiZj"
>
<div
class="sc-keVrkP bbZpZn"
>
55 XEC
</div>
<div
class="sc-dxZgTM lgwTBA"
>
=
$ 0.00 USD
</div>
</div>
</div>
<div
class="sc-drMfKT iCPsPs"
data-cashtab-fixed-cta=""
>
<button
class="sc-cJSrbW sc-hmzhuo hngUCc"
>
Send
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class="sc-hZhUor hfySsW"
>
<div
class="sc-cANqwJ dmpbbR"
>
<img
alt="cashtab"
class="sc-bWjmDF cykJQv"
src="test-file-stub"
/>
</div>
<button
class="sc-hDgvsY cyZOus"
>
<span>
Transactions
</span>
<svg />
</button>
<button
aria-label="Send Screen"
class="sc-hDgvsY gXmBTI"
>
<span>
Send / Receive
</span>
<svg />
</button>
<button
aria-label="Tokens"
class="sc-hDgvsY cyZOus"
>
<span>
Tokens
</span>
<svg
title="Tokens"
/>
</button>
<button
aria-label="Agora"
class="sc-hDgvsY cyZOus"
>
<span>
Agora
</span>
<svg
title="Meme Agora"
/>
</button>
<button
aria-label="Tools"
class="sc-hDgvsY cyZOus"
>
<span>
Tools
</span>
<svg />
</button>
<button
aria-label="Settings"
class="sc-hDgvsY cyZOus"
>
<span>
Settings
</span>
<svg />
</button>
</div>
</div>
</div>
</div>
</body>
at waitForWrapper (/work/node_modules/.pnpm/@testing-library+dom@10.4.1/node_modules/@testing-library/dom/dist/wait-for.js:163:27)
at /work/node_modules/.pnpm/@testing-library+dom@10.4.1/node_modules/@testing-library/dom/dist/query-helpers.js:86:33
at Object.findByText (/work/cashtab/src/components/Configure/__tests__/Configure.test.tsx:178:26)Each failure log is accessible here:
CashTab Unit Tests: <Configure /> Setting "Send Confirmations" settings will show send confirmations
Keep the eye toggle next to the address preview and fix tests for the split confirmation-modal copy.
Treat BIP21 multi-output sends as multi-recipient on the confirmation modal and add a test so it cannot show only the first address and amount.
Build Bitcoin ABC Diffs / Diff Testing (ai-review) passed.
CodeRabbit Review
Diff : committed changes only
Compare : HEAD → master
Directory : work
────────────────────────────────────────
(\(\
(• .•) If you don't fail at least 90% of the time, you're not aiming high enough. - Alan Kay
────────────────────────────────────────────────────────────────────────
major [Functional Correctness]
→ ]8;;vscode://file//work/cashtab/src/components/Send/SendXec.tsx:3075cashtab/src/components/Send/SendXec.tsx:3075-3090]8;;
Include BIP21 multi-output sends in the confirmation summary.
Lines 3088-3090 do not classify
isBip21MultipleOutputsSafe(parsedAddressInput) as a multi-recipient
send. The modal can then show the primary address as the only revealable
recipient, although the transaction includes additional outputs. Render
the BIP21 total and recipient count, and do not show a single-recipient
address in this case. Add a confirmation-modal test for a BIP21 request
with additional outputs.
Proposed fix
const confirmSendIsMulti =
(isTokenMode && selectedTokenId && isOneToManyTokenSend) ||
- isOneToManyXECSend;
+ isOneToManyXECSend ||
+ isBip21MultipleOutputsSafe(parsedAddressInput);
: isOneToManyXECSend
? `Send ${multiSendTotal.toLocaleString(userLocale, {
maximumFractionDigits: 2,
})} XEC to multiple recipients?`
+ : isBip21MultipleOutputsSafe(parsedAddressInput)
+ ? `Send ${bip21MultipleOutputsFormattedTotalSendXec.toLocaleString(
+ userLocale,
+ { maximumFractionDigits: 2 },
+ )} XEC to ${
+ parsedAddressInput.parsedAdditionalXecOutputs.value.length + 1
+ } recipients?`
: `Send ${formData.amount} ${selectedCurrency}...`
Also applies to: 3163-3193────────────────────────────────────────
Review complete
1 finding ✔
Major 1
10 files reviewed:
- cashtab/src/airdrop/__tests__/index.test.ts
- cashtab/src/components/Common/RevealableAddress.tsx
- cashtab/src/components/Common/__tests__/RevealableAddress.test.tsx
- cashtab/src/components/Configure/__tests__/Configure.test.tsx
- cashtab/src/components/Etokens/Token/index.tsx
- cashtab/src/components/Send/SendRecipientInput.tsx
- cashtab/src/components/Send/SendXec.tsx
- cashtab/src/components/Send/__tests__/SendXec.test.js
- cashtab/src/helpers/__tests__/index.test.js
- cashtab/src/helpers/index.ts
────────────────────────────────────────
Print all AI prompts: coderabbit review --show-prompts
Build Bitcoin ABC Diffs / Diff Testing (ai-review) passed.
CodeRabbit Review
Diff : committed changes only
Compare : HEAD → master
Directory : work
────────────────────────────────────────
(\(\
(• .•) Never ask an AI its Energy Star rating.
────────────────────────────────────────────────────────────────────────
major [Functional Correctness] → ]8;;vscode://file//work/cashtab/src/components/Send/SendXec.tsx:3140cashtab/src/components/Send/SendXec.tsx:3140-3149]8;; Handle BIP21 token multi-output confirmations. Line 3140 shows decimalizedTokenQty from the first BIP21 token output. Lines 3145-3149 show only the first recipient address. However, sendToken() sends every row when isBip21TokenSendToMany(parsedAddressInput) is true. For a URL-based token transaction with multiple outputs, show the total token quantity and output count. Do not render a single-recipient address in that case. Add a test for this confirmation path.
────────────────────────────────────────
Review complete
1 finding ✔
Major 1
10 files reviewed:
- cashtab/src/airdrop/__tests__/index.test.ts
- cashtab/src/components/Common/RevealableAddress.tsx
- cashtab/src/components/Common/__tests__/RevealableAddress.test.tsx
- cashtab/src/components/Configure/__tests__/Configure.test.tsx
- cashtab/src/components/Etokens/Token/index.tsx
- cashtab/src/components/Send/SendRecipientInput.tsx
- cashtab/src/components/Send/SendXec.tsx
- cashtab/src/components/Send/__tests__/SendXec.test.js
- cashtab/src/helpers/__tests__/index.test.js
- cashtab/src/helpers/index.ts
────────────────────────────────────────
Print all AI prompts: coderabbit review --show-prompts
Treat BIP21 token send-to-many confirms as multi-output (total qty and count, no single-address reveal) and add a URL Accept-path test.
Tail of the build log:
/work /work/abc-ci-builds/ai-review Connecting to CodeRabbit... 0s elapsed Preparing review... 1s elapsed ✗ Review limit reached Limit details: You’ve used all 5 included reviews currently available under your plan. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. You're only billed for reviews past your plan's rate limits ($0.25/file). You can wait 12 minutes for the limit to reset. https://app.coderabbit.ai/settings/billing?tab=usage&orgId=79839cd4-7849-4bd5-8d6d-5ecaf453356e Build ai-review failed with exit code 1
Build Bitcoin ABC Diffs / Diff Testing (ai-review) passed.
CodeRabbit Review
Diff : committed changes only
Compare : HEAD → master
Directory : work
────────────────────────────────────────
(\(\
(• .•) I am the right brain to your SAST's left brain.
────────────────────────────────────────────────────────────────────────
major [Functional Correctness] → ]8;;vscode://file//work/cashtab/src/components/Send/SendXec.tsx:3141cashtab/src/components/Send/SendXec.tsx:3141-3148]8;; Use exact arithmetic for the BIP21 token confirmation total. The displayed total derives from parseFloat accumulation. The broadcast path converts each row to exact token atoms. Large values or 9-decimal quantities can therefore show an incorrect confirmation total. Sum token atoms or use exact decimal arithmetic before formatting this title. Add a test with a value above the safe integer range and a 9-decimal quantity.
────────────────────────────────────────
Review complete
1 finding ✔
Major 1
11 files reviewed:
- cashtab/src/airdrop/__tests__/index.test.ts
- cashtab/src/components/Common/RevealableAddress.tsx
- cashtab/src/components/Common/__tests__/RevealableAddress.test.tsx
- cashtab/src/components/Configure/__tests__/Configure.test.tsx
- cashtab/src/components/Etokens/Token/index.tsx
- cashtab/src/components/Send/SendRecipientInput.tsx
- cashtab/src/components/Send/SendXec.tsx
- cashtab/src/components/Send/__tests__/SendByUrlParams.test.js
- cashtab/src/components/Send/__tests__/SendXec.test.js
- cashtab/src/helpers/__tests__/index.test.js
... and 1 more file
────────────────────────────────────────
Print all AI prompts: coderabbit review --show-prompts