Problem
src/components/ClaimableBalanceCard.tsx BalanceRow.handleClaim handles the result of claimBalance with:
const { error } = await getClient().account.claimBalance(cb.id);
if (!error) setClaimed(true);
The else branch is entirely missing. When claimBalance returns an error string the button simply re-enables and nothing happens — users receive zero feedback. Additionally, if the API returns { data: null, error: null } (valid per the SorokitClient type), setClaimed(true) fires with no real ledger confirmation.
Two more related problems: (1) after a successful claim the row stays visible with a "Claimed" badge but is never removed from the list, leaving the count badge in the header stale; (2) there is no loading guard preventing a second Claim click while the first is in-flight.
Solution
Add a local claimError state to BalanceRow and display it inline on failure. Verify data is non-null before setting claimed. Lift a removal callback from the parent so the claimed row is removed after success. Disable the Claim button while claiming is true.
Acceptance Criteria
Note for Contributors: If you're assigned to this issue, write a clear and detailed description for your pull request. Explain what was changed, why it was needed, how it was implemented, and include any relevant testing or screenshots where applicable.
Problem
src/components/ClaimableBalanceCard.tsxBalanceRow.handleClaimhandles the result ofclaimBalancewith:The
elsebranch is entirely missing. WhenclaimBalancereturns an error string the button simply re-enables and nothing happens — users receive zero feedback. Additionally, if the API returns{ data: null, error: null }(valid per theSorokitClienttype),setClaimed(true)fires with no real ledger confirmation.Two more related problems: (1) after a successful claim the row stays visible with a "Claimed" badge but is never removed from the list, leaving the count badge in the header stale; (2) there is no loading guard preventing a second Claim click while the first is in-flight.
Solution
Add a local
claimErrorstate toBalanceRowand display it inline on failure. Verifydatais non-null before settingclaimed. Lift a removal callback from the parent so the claimed row is removed after success. Disable the Claim button whileclaimingis true.Acceptance Criteria
claimBalancecall shows an inline error message below the Claim buttonclaimedis only set totruewhendatais non-null