Conversation
|
packages/yoroi-extension/app/UI/features/airdrop/useCases/Redeem.tsx
Outdated
Show resolved
Hide resolved
packages/yoroi-extension/app/UI/features/airdrop/useCases/Redeem.tsx
Outdated
Show resolved
Hide resolved
banklesss
left a comment
There was a problem hiding this comment.
It seems that the cursor suggestions make sense.
packages/yoroi-extension/app/UI/features/airdrop/useCases/Redeem.tsx
Outdated
Show resolved
Hide resolved
packages/yoroi-extension/app/UI/features/airdrop/useCases/AddressCard.tsx
Outdated
Show resolved
Hide resolved
packages/yoroi-extension/app/UI/features/airdrop/useCases/Zero.tsx
Outdated
Show resolved
Hide resolved
packages/yoroi-extension/app/UI/features/airdrop/useCases/AddressDetails.tsx
Show resolved
Hide resolved
| //hack: detect that the copy address icon is clicked | ||
| if ((event.target as HTMLElement).tagName === 'svg') { | ||
| return; | ||
| } |
There was a problem hiding this comment.
Bug: SVG click detection only catches parent element clicks
The click handler checks if event.target.tagName === 'svg' to detect clicks on the copy icon, but this only works when clicking directly on the SVG element itself. Clicking on child elements inside the SVG (like path, rect, or circle elements) will have a different tagName, causing the check to fail and onSelect() to be called unintentionally when users click on parts of the copy icon.
| const [getCollateralUtxosResult, setGetCollateralUtxosResult] = useState<any>(null); | ||
| const [redemptionTxBuildingResponse, setRedemptionTxBuildingResponse] = useState<any>(null); | ||
| const [error, setError] = useState<string | null>(null); | ||
| void error; |
There was a problem hiding this comment.
Bug: Error state captured but never displayed to user
The error state is declared and set when getRedemptionTransaction fails, but it's immediately voided with void error and never rendered in the component. When an error occurs, users will see the loading indicator indefinitely with no feedback about what went wrong, since redemptionTxBuildingResponse remains null and the component displays strings.redeemLoading.





Note
Implements Midnight airdrop redemption: scans address thaw schedules, shows statuses/details, and builds/signs redemption tx with collateral handling, while refactoring UI to shared i18n strings.
AirdropPageoverhaul to scan wallet addresses for thaws, list destinations (AddressCard), and show schedule/details (AddressDetails).Redeemdialog to fetch collateral, build redemption tx, handle reorg flow, and send via tx review modal.AbortDialog,ClaimDialog,LedgerClaimDialog,ClaimInfo,Terms,Zero) to use shared strings viauseStrings.api/ada/midnight.jswith thaw scanning (scanAddressesForThaws), thaw schedule fetch, collateral selection (getCollateralUtxoswith reorg path), reorg tx creation, and redemption tx builder (getRedemptionTransaction).midnightRedemption.tswithScheduletypes and helpers (formatNumber,getRedeemable,getTotal,getStatus).useStringshook; updateen-US.json.illustration_staticto light/dark palettes; tweakTopBarLayoutoverflow toauto.Written by Cursor Bugbot for commit 8861f74. This will update automatically on new commits. Configure here.