-
Notifications
You must be signed in to change notification settings - Fork 180
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
[W3M] SDK Interface cleanup #898
Conversation
7fe5d7c
to
374161c
Compare
58ddec6
to
0eed6c7
Compare
37a113b
to
f173667
Compare
f173667
to
084f586
Compare
|
||
/// For proposing a session to a wallet. | ||
/// Function will propose a session on newly created pairing. | ||
public func createPairingAndConnect() async throws -> WalletConnectURI { |
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.
would make sense to call the method just connect() with an optional topic?
same as deprecated method of sign client
public func connect(
requiredNamespaces: [String: ProposalNamespace],
optionalNamespaces: [String: ProposalNamespace]? = nil,
sessionProperties: [String: String]? = nil,
topic: String? = nil
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.
actually would match kotlin's interface too
public static func set(sessionParams: SessionParams) { | ||
Web3Modal.config.sessionParams = sessionParams | ||
} |
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.
what the set method is for?
what's the difference between configure()?
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.
I thought this could be used to change sessionParams
on fly (e.g. users selects different chain) while configure()
is more like a one time initialisation
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.
I see, does it work? It’s singletons and config is used on the instantiation, so with the first call only
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.
Yes, it works. Config is stored as a static variable, which can be changed only via these 2 methods. I'm calling set()
from Dapp
No description provided.