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

fix: APP-3070 - Update WC network switch flow via dAppConnect #1330

Merged
merged 10 commits into from
Apr 23, 2024

Conversation

thekidnamedkd
Copy link
Contributor

@thekidnamedkd thekidnamedkd commented Apr 17, 2024

Description

proposed solution to align the WalletConnect connector with the current app network (chainId) across the app

Task: APP-3070

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have selected the correct base branch.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.
  • I have tested my code on the test network.

@thekidnamedkd thekidnamedkd changed the title Fix/app 3070 fix: APP-3070 - Base's chain ID via WC when you try to connect another DAO via dAppConnect Apr 17, 2024
@thekidnamedkd thekidnamedkd marked this pull request as draft April 17, 2024 12:04
src/app.tsx Outdated Show resolved Hide resolved
@thekidnamedkd
Copy link
Contributor Author

@sepehr2github @cgero-eth it's kind of a long set up for this scenario, but as evidence here's the console before and after clicking 'switch network' in the network error modal:

image

@thekidnamedkd thekidnamedkd marked this pull request as ready for review April 19, 2024 07:06
src/hooks/useSwitchNetwork.tsx Outdated Show resolved Hide resolved
src/containers/networkErrorMenu/index.tsx Outdated Show resolved Hide resolved
@thekidnamedkd thekidnamedkd changed the title fix: APP-3070 - Base's chain ID via WC when you try to connect another DAO via dAppConnect fix: APP-3070 - Update WC network switch flow via dAppConnect Apr 22, 2024
@thekidnamedkd thekidnamedkd requested a review from cgero-eth April 23, 2024 13:43
Copy link
Member

@cgero-eth cgero-eth left a comment

Choose a reason for hiding this comment

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

Much cleaner now by using wagmi functionalities, thanks @thekidnamedkd! Let's only remove the console logs and we can merge the PR

src/app.tsx Outdated Show resolved Hide resolved
@thekidnamedkd thekidnamedkd merged commit 9275604 into develop Apr 23, 2024
3 checks passed
@thekidnamedkd thekidnamedkd deleted the fix/APP-3070 branch April 23, 2024 14:08
Barukimang pushed a commit that referenced this pull request May 2, 2024
* wip: show possible solution for aligning WC network with app network

* chore: add more detail to comments, default chain in WAGMI as mainnet

* chore: remove extra console.log

* chore: move global network switch to network error modal flow

* chore: remove extra console.log

* chore: refactor WC connector + switch to be more defensive

* chore: refactor to use wagmi hook directly, remove custom switchNetwork

* chore: remove console logs, unneeded connector hooks
Barukimang added a commit that referenced this pull request May 28, 2024
…s) (#1351)

* fix localhost url

* enable running localserver before test

* fix dao creation

* fix create proposal

* fix: APP-3028 - Fix strings for approve and execute transaction dialog (#1332)

* fix: APP-2956 - Refine session detection for terminated sessions on dAppConnect Actions flow  (#1333)

* fix: refine session detection for terminated sessions on dapp, connected apps key to more unique topic string, memoize session

* chore: implement useRef for better lifecycle, race condition handling

* chore: swap out piece of state in favor of ref

* chore: remove unused import

* chore: refactor if statement, clean up comments

* fix: APP-3070 - Update WC network switch flow via dAppConnect (#1330)

* wip: show possible solution for aligning WC network with app network

* chore: add more detail to comments, default chain in WAGMI as mainnet

* chore: remove extra console.log

* chore: move global network switch to network error modal flow

* chore: remove extra console.log

* chore: refactor WC connector + switch to be more defensive

* chore: refactor to use wagmi hook directly, remove custom switchNetwork

* chore: remove console logs, unneeded connector hooks

* fix: APP-3069 - Fix "all fields must have valid input" invalid error for all SCC proxy contracts (#1335)

* fix SCC ABI validaiton

* fix lint errors

* resolve comments

* fix: Fix gasless proposal creation and mint action for gasless DAOs (#1334)

* fix vote and execute

* fix create new token dao

* improve existing token test

* fix tests

---------

Co-authored-by: cgero.eth <[email protected]>
Co-authored-by: Kevin Davis <[email protected]>
Co-authored-by: Sepehr Sanaei <[email protected]>
Co-authored-by: selankon <[email protected]>
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.

3 participants