-
Notifications
You must be signed in to change notification settings - Fork 21
feat: Initiate observables-connect package
#218
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 20 out of 26 changed files in this pull request and generated 1 comment.
Files not reviewed (6)
- builder/package.json: Language not supported
- library/factories/package.json: Language not supported
- library/hooks/package.json: Language not supported
- library/observables-connect/package.json: Language not supported
- library/observables-connect/tsconfig.json: Language not supported
- library/react-connect-kit/package.json: Language not supported
Comments suppressed due to low confidence (1)
builder/src/builders/observables-connect/index.ts:22
- Throwing a plain string instead of an Error object may hinder debugging and stack trace visibility. Consider throwing an Error instance (e.g. throw new Error('Prebuild failed.')) to improve error handling.
if (!(await prebuild(folder))) { throw `Prebuild failed.` }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 20 out of 26 changed files in this pull request and generated 1 comment.
Files not reviewed (6)
- builder/package.json: Language not supported
- library/factories/package.json: Language not supported
- library/hooks/package.json: Language not supported
- library/observables-connect/package.json: Language not supported
- library/observables-connect/tsconfig.json: Language not supported
- library/react-connect-kit/package.json: Language not supported
Comments suppressed due to low confidence (2)
library/react-connect-kit/src/types.ts:4
- Please verify that the exported types from '@w3ux/types' fully match the previously used local definitions to ensure all usages in react-connect-kit remain compatible.
import type { ExtensionInjected, ExtensionInterface } from '@w3ux/types'
library/react-connect-kit/src/ExtensionsProvider/index.tsx:52
- Confirm that the imported 'canConnect' function from '@w3ux/observables-connect/extensions' accurately reflects the previous logic (i.e. checking installation and connection status) to avoid unexpected scenarios.
const extensionCanConnect = (id: string): boolean => canConnect(id)
This PR introduces a new package,
observables-connectto abstract extensions discovery from React. Instead,react-connect-kitnow relies on this new package by subscribing to these observables and updating its extension state when extensions are discovered.This PR paves the way to decoupling all API state from React components, allowing dapps like staking dashboard to be more flexible with their data management.