Skip to content

feat: add widget light#664

Merged
chybisov merged 15 commits intomainfrom
add-widget-light
Mar 6, 2026
Merged

feat: add widget light#664
chybisov merged 15 commits intomainfrom
add-widget-light

Conversation

@chybisov
Copy link
Copy Markdown
Member

@chybisov chybisov commented Mar 5, 2026

Which Jira task is linked to this PR?

Why was it implemented this way?

Explain the reasoning behind the implementation. Were there alternative approaches? Why was this solution chosen?

Visual showcase (Screenshots or Videos)

If applicable, attach screenshots, GIFs, or videos to showcase the functionality, UI changes, or bug fixes.

Checklist before requesting a review

  • I have performed a self-review and testing of my code.
  • This pull request is focused and addresses a single problem.
  • If this PR modifies the Widget API or adds new features that require documentation, I have updated the documentation in the public-docs repository.

@@ -0,0 +1,3 @@
VITE_OPENSEA_API_KEY=ee7460014fda4f58804f25c29a27df35
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Exposed secret in examples/nft-checkout/.env - high severity
Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More Info

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fine in this case


export const App = () => {
const pathnameParams = window.location.pathname.substring(1).split('/')
const IFRAME_PROVIDERS = [
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

IFRAME_PROVIDERS is a module-level array created at import time (calls EthereumProvider()). Avoid instantiating providers at module scope because instances may cache connection/request-specific state across usages; construct them inside the component or a factory instead.

Details

✨ AI Reasoning
​A new top-level array named IFRAME_PROVIDERS is created at module load time and populated by calling EthereumProvider(). Module-level variables persist for the lifetime of the imported module. If provider instances carry connection- or request-specific state, creating them at import-time causes that state to be shared across different consumers or requests. This can lead to stale or cross-user state leaking between usages in environments where the module is reused (SSR, server-side rendering, long-running processes). The change introduced this global by moving provider instantiation out of a component or factory and into module scope, increasing risk of unintended shared state.

🔧 How do I fix it?
Avoid storing request-specific data in module-level variables. Use request-scoped variables or explicitly mark shared caches as intentional.

Reply @AikidoSec feedback: [FEEDBACK] to get better review comments in the future.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

@chybisov chybisov merged commit 8fb756d into main Mar 6, 2026
2 checks passed
@chybisov chybisov deleted the add-widget-light branch March 6, 2026 16:17
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