Skip to content

show failed status from the thaw schedule endpoint#4482

Merged
Nebyt merged 3 commits intodevelopfrom
feat/YW-444/failed-thaw
Jan 12, 2026
Merged

show failed status from the thaw schedule endpoint#4482
Nebyt merged 3 commits intodevelopfrom
feat/YW-444/failed-thaw

Conversation

@yushih
Copy link
Collaborator

@yushih yushih commented Jan 5, 2026

Note

Introduces explicit handling of the failed thaw status in the Midnight airdrop flow.

  • UI: AddressDetails now treats failed as a distinct status (type, badge styling, status message, and current thaw index), with a visual X icon and adjusted step colors
  • Logic: getRedeemableAmount now includes thaws with status failed alongside redeemable
  • i18n: Adds airdrop.schedule.failed and exposes strings.failed via useStrings

Written by Cursor Bugbot for commit e4c8c86. This will update automatically on new commits. Configure here.

@loxator loxator added this to the 5.21.0 milestone Jan 5, 2026
@Nebyt Nebyt merged commit 98f2a2d into develop Jan 12, 2026
1 of 2 checks passed
@Nebyt Nebyt deleted the feat/YW-444/failed-thaw branch January 12, 2026 09:13
return schedule.thaws
.slice(schedule.numberOfClaimedAllocations)
.filter(thaw => thaw.status === 'redeemable')
.filter(thaw => thaw.status === 'redeemable' || thaw.status === 'failed')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed thaws incorrectly counted in redeemable amount

High Severity

The getRedeemableAmount function now includes thaws with 'failed' status in the redeemable total. This causes failed thaw amounts to be shown to users as redeemable, enables the Redeem button when only failed thaws exist, and marks the overall status as 'ready'. Failed thaws by definition have already failed and likely cannot be redeemed, making this amount misleading to users and potentially triggering redemption flows that will fail.

Fix in Cursor Fix in Web

const redeemableIndex = schedule.thaws.findIndex(thaw => thaw.status === 'redeemable' || thaw.status === 'failed');
if (redeemableIndex >= 0) return redeemableIndex;
const upcomingIndex = schedule.thaws.findIndex(thaw => thaw.status === 'upcoming');
const upcomingIndex = schedule.thaws.findIndex(thaw => thaw.status === 'upcoming' || thaw.status === 'failed');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant failed status check is dead code

Low Severity

The || thaw.status === 'failed' condition on line 163 (checking for 'upcoming' || 'failed') is unreachable. If any failed thaw exists, it will be found by the first findIndex on line 161 (which already checks for 'failed'), and the function returns before reaching line 163. This suggests confusion about how failed thaws should be handled for determining the current thaw index.

Fix in Cursor Fix in Web

type ThawStatus = 'redeemable' | 'confirmed' | 'upcoming' | 'failed';

function getThawStatusType(status: string): ThawStatus {
if (status === 'failed') return 'failed';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed status badge missing distinct visual styling

Low Severity

The getStatusBadgeStyle function has no case for 'failed' status, so it falls through to the default case and receives the same gray styling as 'upcoming' items. This creates an inconsistent UI where failed thaws display a distinct red X icon in the step indicator but their status badge looks identical to "Not available yet" badges. Given this PR specifically adds failed status display with distinct visual treatment elsewhere, the badge styling appears to be an incomplete implementation.

Fix in Cursor Fix in Web

@zuzunker zuzunker mentioned this pull request Jan 22, 2026
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants