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

[bug] Update options doing nothing #3748

Open
AleksandrRadik opened this issue Jan 27, 2025 · 2 comments
Open

[bug] Update options doing nothing #3748

AleksandrRadik opened this issue Jan 27, 2025 · 2 comments
Labels
bug Something isn't working needs review

Comments

@AleksandrRadik
Copy link

Link to minimal reproducible example

https://stackblitz.com/edit/github-dxwhgfch

Summary

Hi there, guys!

Desctiption of problem
I have already created issues before to add a feature to overwrite options for AppKit, and while continuing to work with the updateOptions method, I realized that it does not fulfill its main function at all (in my opinion). When using this method, I expect that AppKit Modal will overwrite the options it works with (or at least extend them) and provide the ability to use other networks. But when I calling the updateOptions method, nothing happens, when I look at the AppKit object via console.log I see that no options have changed at all, so at the moment I consider this a bug. Although I assume that the error may be on my part, since I do not fully understand the concept of the updateOptions method, if so I will be grateful for at least a brief explanation of what problems it is supposed to solve.

Instruction for reproduce
To reproduce this bug in StackBlitz, you can first look at the modal as it was originally (with options for Solana), then click on the Update Options button, this will call the updateOptions method and try to overwrite the options for ether, but when you reopen the modal you will see that nothing has changed (the main difference that will be immediately visible is that ether has Nicegram Wallet in the includes & features wallets list), also added a button to output the AppKit object to the console.

Concept of project
For a full understanding, I will describe the concept of my project. This is a Web3App with the ability to work with different blockchains and currencies, and according to the idea, the user first chooses which currency he wants to work with and goes to a page where he directly works only with this currency, and already at this step I create AppKit and other tools for connection specifically for this case, since AppKit constantly keeps an existing instance with specified options and networks, I decided not to create it again but simply change the options for the existing one, but this is where the problem arose, I can't do it. Two main problems:

  • Includes & Features WalletIds are not overwritten, which leads to the fact that the user sees the opportunity to connect a wallet that does not support the selected currency
  • Since the networks field is not overwritten, when connecting to the wallet, Web3App requests data for an invalid currency, for example, first the user logged in to Solana, I create an AppKit object with parameters for Solana, then he decides that he wants to work with ether, and here I try to overwrite the data for ether, but this does not happen and when the user initiates the connection, I get access to the wallet from Solana, although I would have it via ether

I really hope for your help, or at least tips on how to better approach the implementation of such an application concept using Reown AppKit

List of related npm package versions

Look at stackblitz

Node.js Version

v22.12.0

Package Manager

[email protected]

@AleksandrRadik AleksandrRadik added bug Something isn't working needs review labels Jan 27, 2025
Copy link

linear bot commented Jan 27, 2025

@AleksandrRadik
Copy link
Author

#UPDATE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs review
Projects
None yet
Development

No branches or pull requests

2 participants
@AleksandrRadik and others