apibara / starknet-react

A collection of React providers and hooks for StarkNet
https://starknet-react.com
MIT License
366 stars 146 forks source link

Add hook to change network #212

Closed fracek closed 2 months ago

fracek commented 1 year ago

Wallet now support adding a network and asking users to switch network. We should expose an hook to do that.

Requires #211

0xads commented 1 year ago

After some research I can work on it.

fracek commented 1 year ago

Perfect, looking forward to review the PR!

0xads commented 1 year ago

Hi, I'm a little busy at work. If anyone wants to take it. Otherwise I'll dot it in a few weeks.

fricoben commented 1 year ago

Will work on it

YohanTz commented 1 year ago

Will work on it

Hey @fricoben, are you still working on this one ?

fricoben commented 1 year ago

No you can go for it

ktarun1419 commented 9 months ago

Hi @YohanTz is this issue still open ?

ktarun1419 commented 9 months ago

I want to work on it

YohanTz commented 9 months ago

Hi @YohanTz is this issue still open ?

Hey @ktarun1419, a working PR is here: https://github.com/apibara/starknet-react/pull/307, but can't be merged for now, as mentioned in the PR description :)

ktarun1419 commented 9 months ago

Hi @YohanTz is this issue still open ?

Hey @ktarun1419, a working PR is here: #307, but can be merged for now, as mentioned in the PR description :)

Thank you :)

github-actions[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had activity in the six months. It will be closed in 2 weeks if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant.

fracek commented 2 months ago

This can now be added to starknet react v3.

sotoyjuan commented 2 months ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hey! I'd like to collaborate on this project. I have five years of frontend development experience, I'm currently going through a Starknet bootcamp with Dojo Coding, which provides me with the foundational knowledge needed. I believe this combination of my experience and current training makes me well-suited to tackle this issue. I've already contributed to another project using Typescript and Starknet.js. Thanks for considering me.

How I plan on tackling this issue

I would start by testing old PR's and go from there.

fracek commented 2 months ago

Hey, happy to review the PR for this. BTW if you wait a bit it can be part of OD Hack

GoSTEAN commented 2 months ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I’m proficient in JavaScript and TypeScript, and have extensive experience with React, which allows me to create and manage custom hooks effectively. I’m also well-versed in Web3 technologies and wallet integrations, including working with APIs like MetaMask and WalletConnect, which are crucial for handling network management and interactions with blockchain networks.

I have a solid understanding of blockchain networks, including how to add new networks and handle network switching. My problem-solving skills help me tackle integration challenges and ensure smooth functionality. I also have experience testing hooks across different environments to ensure they work reliably and consistently.

How I plan on tackling this issue

  1. Define a New Hook: Create a custom hook that provides functionality for adding a network and prompting users to switch networks, encapsulating the necessary logic and state management.

  2. Implement Network Addition: In the hook, include methods for adding a new network to the wallet, ensuring it handles network configuration and integration smoothly.

  3. Handle Network Switching: Add functionality to the hook for requesting users to switch to a different network, including user prompts or automatic network changes.

  4. Integrate with Existing Features: Ensure the new hook integrates with your existing wallet and network management features, addressing any dependencies or interactions as outlined in Issue #211.

  5. Test Thoroughly: Test the hook in various scenarios to confirm it successfully adds networks and handles network switching, ensuring compatibility across different wallets and user environments.

ShantelPeters commented 2 months ago

Hi @fracek can I work on this issue

Benjtalkshow commented 2 months ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hi @fracek

I'm ready to work on creating a hook to support adding and switching networks in a wallet. My name is Benjamin, and I have extensive experience in developing custom hooks for blockchain interactions, including wallet management and network handling. My background includes integrating network management features to enhance user experience in decentralized applications.

Understanding the Issue

The current wallet functionality includes adding a network and asking users to switch networks. To improve usability and streamline network management, we need to expose a custom hook that facilitates these actions programmatically. This feature requires the implementation details from issue #211.

How I plan on tackling this issue

Develop Network Management Hook

Implementation Steps

Tasks

Develop Hook

Testing

fracek commented 2 months ago

Hey @ShantelPeters did you apply trough only dust? I think it's required.

ShantelPeters commented 2 months ago

Thank you I’ll get straight to work

ShantelPeters commented 2 months ago

Hi @fracek you said the issue is invalid and there’s nothing to do sir

fracek commented 2 months ago

Hey, yes the hook is already in starknet react v3. Closing it for now.