Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Re-enable no-misused-promises and no-dynamic-delete eslint rules #5753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
swansontec merged 2 commits into develop from matthew/eslint-fixes
Sep 27, 2025

Conversation

@peachbits
Copy link
Contributor

@peachbits peachbits commented Sep 24, 2025
edited by cursor bot
Loading

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)


Note

Re-enables @typescript-eslint/no-misused-promises and @typescript-eslint/no-dynamic-delete, refactoring handlers and data structures (use Maps/immutable copies), adding explicit error handling, and adjusting timers/polling across UI, providers, and utilities.

  • ESLint & Codebase-wide refactors:
    • Re-enable @typescript-eslint/no-misused-promises and @typescript-eslint/no-dynamic-delete in eslint.config.mjs.
    • Replace delete obj[key] patterns with immutable rest copies or Map APIs; migrate various caches/state to Map (perf timers, stake metadata cache, rates resolver map, filters, pending calls, etc.).
    • Convert async void UI handlers to non-async functions using promise chains with .catch(showError); tighten types (e.g., onPress?: () => Promise<void> where needed).
    • Wrap intervals/polling with safe tasks (makePeriodicTask) and ensure cleanup via .stop(); add centralized error reporting in periodic callbacks.
  • UI/Scenes & Modals:
    • Update handlers in country selection, login, category/password modals, transfer/wallet selection, FIO scenes, wallet list components to avoid misused promises and use explicit error handling.
    • Minor signature/behavior tweaks (e.g., EarnOptionCard onPress, WalletList default onPress).
  • Fiat providers & payment flows (banxa, kado, moonpay, paybis, revolut, simplex):
    • Harden webview/deeplink flows with error handling; refactor callbacks to non-async handlers; add polling via PeriodicTask; fix status handling.
  • Utilities:
    • Refactor FIO address utils to avoid dynamic delete; adjust exchange rates queue to Map with safer iteration; improve app perf timer storage.
    • Misc reliability improvements (theme polling, WalletConnect unmount cleanup).

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

Copy link
Contributor

@swansontec swansontec left a comment

Choose a reason for hiding this comment

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

Thanks, these are two really good lint rules to have switched back on.

cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

@swansontec swansontec left a comment

Choose a reason for hiding this comment

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

I went ahead and pushed up a fixup, so we can get this in.

}

let interval: ReturnType<typeof setInterval> | undefined
let interval: ReturnType<typeof makePeriodicTask> | undefined
Copy link
Contributor

@swansontec swansontec Sep 27, 2025

Choose a reason for hiding this comment

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

ReturnType<typeof makePeriodicTask> is called PeriodicTask. I'll import the type for ya.

setConnectWalletsMap(rest)
} else {
disconnectWalletsMap[item.key]=item
setDisconnectWalletsMap({ ...disconnectWalletsMap,[item.key]: item})
Copy link

@cursor cursor bot Sep 27, 2025

Choose a reason for hiding this comment

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

Bug: State Mutation Causes React to Miss Updates

The useFilter hook directly mutates filteredDataCache (a Map) and fifoCache (an array) state objects. Passing these mutated references to setState can prevent React from detecting changes, potentially causing missed re-renders and unexpected UI behavior.

Additional Locations (1)

Fix in Cursor Fix in Web

@swansontec swansontec merged commit 334dd89 into develop Sep 27, 2025
3 checks passed
@swansontec swansontec deleted the matthew/eslint-fixes branch September 27, 2025 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cursor cursor[bot] cursor[bot] left review comments

@swansontec swansontec swansontec approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /