Skip to content

client/asset/eth: remove ineffectual brickedFailCount param#14

Open
norwnd wants to merge 1 commit into
masterfrom
client-asset-eth-remove-ineffectual-param
Open

client/asset/eth: remove ineffectual brickedFailCount param#14
norwnd wants to merge 1 commit into
masterfrom
client-asset-eth-remove-ineffectual-param

Conversation

@norwnd

@norwnd norwnd commented Mar 22, 2023

Copy link
Copy Markdown
Owner

When testing I discovered this brickedFailCount doesn't really have any effect because tip.failCount gets reset to 0 before ever reaching it, and failQuarantine is probably does the job on its own anyway.

@norwnd norwnd force-pushed the master branch 4 times, most recently from ad9d264 to e298e04 Compare November 24, 2024 18:25
@norwnd norwnd force-pushed the master branch 5 times, most recently from f9959eb to a66bbae Compare January 10, 2025 06:09
@norwnd norwnd force-pushed the master branch 3 times, most recently from e3c487c to 333e9f6 Compare January 18, 2025 13:45
norwnd pushed a commit that referenced this pull request Apr 16, 2026
…ug fix

Batches the six easy/low-risk cleanup items from T18 into a single
commit, plus a related bug fix discovered during T18#10 research.

T18#6: DCR_ASSET_ID local constant -> shared DCRAssetID
- WalletsPage.tsx previously declared `const DCR_ASSET_ID = 42`
  duplicating the existing `DCRAssetID` export in stores/types.ts.
  Now imports from the shared location.

T18#13: dead createUpdater state in NewWalletForm
- Removed the `const [createUpdater] = useState(null)` line and its
  associated `useNotifications({ createwallet })` handler. The
  handler body had a `if (createUpdater) ...` null check on a
  value that was always null, so the body never ran. Dead code
  from an earlier refactor. Also removed the now-unused
  WalletCreationNote and useNotifications imports.

T18#14: duplicate checkResponse helpers
- services/api.ts and hooks/useApi.ts both exported identical
  `checkResponse` helpers. The canonical location is now
  services/api.ts (where the related postJSON/getJSON/APIResponse
  types live). Migrated 4 importers (DepositAddress,
  WalletConfigForm, TokenApprovalForm, NewWalletForm) and deleted
  the duplicate export from useApi.ts.

T18#4: returnPage typed as free-form string
- Added `type MMLogsReturnPage = 'mm' | 'mmarchives'` to
  router/routes.ts. MMLogsPage now narrows the raw query-param
  string via the union type, and MMArchivesPage assigns through a
  typed local constant. Prevents typos from silently falling
  through to the default 'mm' on either side of the producer/
  consumer boundary.

T18#9: icon-only link a11y in SetVotesModal
- Added `aria-label={tspend.hash.slice(0, 8)... in block explorer}`
  to the tspend explorer `<a>` (was a bare `ico-open` anchor with
  no accessible text) and `aria-label={View proposal: ${name}}`
  to the proposal `<Link>`. Both elements are icon-only so screen
  readers had no fallback text before this change. Matches vanilla's
  visual behavior; vanilla has the same a11y gap.

T18#10: proper TransactionNote type (+ B-L16 dispatch bug fix)
- BridgingPopup's handleTransactionNote previously cast the
  incoming note to an ad-hoc `{ transaction?: { id, timestamp } }`
  shape. Replaced with the existing `TransactionNote` type from
  stores/types.ts.
- Discovered a REAL BUG during the type audit: the popup was
  subscribing to a top-level `transaction` note type that does
  not exist. Vanilla's dispatch flow wraps these inside
  `walletnote` (CoreNote with type='walletnote' and
  payload.route='transaction'); see wallets.ts L2767
  `handleCustomWalletNote` + L2791 `case 'transaction'`. So my
  handler never fired. Fixed by subscribing to `walletnote:`
  instead and unwrapping the payload inline. The cosmetic
  timestamp-refresh behavior that was silently broken now works.
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.

1 participant