Skip to content
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

refactor: web3 connection #253

Closed
wants to merge 14 commits into from
Closed

Conversation

gratestas
Copy link
Member

No description provided.

This commit introduces the Connection class, which acts as a central hub for managing Ethereum connections(wallets) and state updates.

Key features:
- Manages active Ethereum providers and establishes connection
- Detects and selects active connectors
- Provides methods to enable connection eagerly or upon user interaction
- Monitors block number, account and chain changes
- Inherits the Observer pattern functionality, allowing it to notify subsribed observers about state updates.
- Implements the Singleton pattern to ensure a single instance is maintained throughout the app
The SessionProvider encapsulates logic for invoking contract calls and txs, handling different chains and user interactions. It utilizes viem library to create a wallet client.
…ity and readability

changes:
- single responsibility for app's state updates
- app's tate update handling through subscription to connection instance as obeserver
@netlify
Copy link

netlify bot commented Aug 13, 2023

Deploy Preview for truthpost ready!

Name Link
🔨 Latest commit 3475a43
🔍 Latest deploy log https://app.netlify.com/sites/truthpost/deploys/64d8d2ca68482b0008d77731
😎 Deploy Preview https://deploy-preview-253.truthpost.news/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@gratestas gratestas linked an issue Aug 13, 2023 that may be closed by this pull request
@gratestas gratestas marked this pull request as draft August 13, 2023 12:56
@gratestas gratestas requested a review from 0xferit August 13, 2023 12:56
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 51 Code Smells

No Coverage information No Coverage information
50.5% 50.5% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@0xferit
Copy link
Member

0xferit commented Dec 12, 2023

Closing due to inactivity.

@0xferit 0xferit closed this Dec 12, 2023
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.

Multi-wallet support
2 participants