-
Notifications
You must be signed in to change notification settings - Fork 2
Deprecate WalletConnect and update to Reown #14
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,11 +7,10 @@ | |
|
|
||
| import BigInt | ||
| import CryptoKit | ||
| import WalletConnectSign | ||
| import UIKit | ||
| import Combine | ||
| import WalletConnectModal | ||
| import Utilities | ||
| @preconcurrency import ReownAppKit | ||
|
|
||
| final class WalletConnectV2Provider: NSObject, WalletOperationProviderProtocol { | ||
| private var backgroundTaskId: UIBackgroundTaskIdentifier = .invalid | ||
|
|
@@ -114,7 +113,7 @@ final class WalletConnectV2Provider: NSObject, WalletOperationProviderProtocol { | |
| connectCompletions.append(completion) | ||
|
|
||
| if request.useModal { | ||
| WalletConnectModal.present() | ||
| AppKit.present() | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -187,7 +186,7 @@ final class WalletConnectV2Provider: NSObject, WalletOperationProviderProtocol { | |
| if success { | ||
| self?.reallySign(typedDataProvider: typedDataProvider, | ||
| accountAddress: request.address, | ||
| chainId: request.chainId) { [weak self] signed, error in | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just curious what was the reason to remove the [weak self]? Is it because we want this to run even if there isn't a reference to self anymore?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The block doesn't reference to self, so no need to do weak self to avoid retain cycle. |
||
| chainId: request.chainId) { signed, error in | ||
| LocalAuthenticator.shared?.paused = false | ||
| completion(signed, error) | ||
| } | ||
|
|
@@ -223,7 +222,7 @@ final class WalletConnectV2Provider: NSObject, WalletOperationProviderProtocol { | |
| if success { | ||
| self?.reallySend(transaction: transaction, | ||
| accountAddress: request.walletRequest.address, | ||
| chainId: request.walletRequest.chainId) { [weak self] response, error in | ||
| chainId: request.walletRequest.chainId) { response, error in | ||
| LocalAuthenticator.shared?.paused = false | ||
| completion(response, error) | ||
| } | ||
|
|
||
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.
cc @Sam-dYdX It could be worthwhile to migrate our Coinbase wallet integration to Reown as well at some point.