diff --git a/Example/DApp/Auth/AuthView.swift b/Example/DApp/Auth/AuthView.swift index d3e699ed3..e39211e9a 100644 --- a/Example/DApp/Auth/AuthView.swift +++ b/Example/DApp/Auth/AuthView.swift @@ -3,39 +3,38 @@ import SwiftUI struct AuthView: View { @ObservedObject var viewModel: AuthViewModel - + var body: some View { VStack(spacing: 16.0) { - + Spacer() - + Image(uiImage: viewModel.qrImage ?? UIImage()) .interpolation(.none) .resizable() .frame(width: 300, height: 300) - + signingLabel() .frame(maxWidth: .infinity) - + Spacer() - + Button("Connect Wallet", action: { }) .buttonStyle(CircleButtonStyle()) - + Button("Copy URI", action: { viewModel.copyDidPressed() }) .buttonStyle(CircleButtonStyle()) - + Button("Deeplink", action: { viewModel.deeplinkPressed() }) .buttonStyle(CircleButtonStyle()) - - + } .padding(16.0) .onAppear { Task(priority: .userInitiated) { try await viewModel.setupInitialState() }} } - + @ViewBuilder private func signingLabel() -> some View { switch viewModel.state { diff --git a/Example/DApp/Sign/Accounts/AccountsViewController.swift b/Example/DApp/Sign/Accounts/AccountsViewController.swift index ad29010ae..a7e263999 100644 --- a/Example/DApp/Sign/Accounts/AccountsViewController.swift +++ b/Example/DApp/Sign/Accounts/AccountsViewController.swift @@ -38,7 +38,6 @@ final class AccountsViewController: UIViewController, UITableViewDataSource, UIT super.viewDidLoad() navigationItem.title = "Accounts" - navigationItem.rightBarButtonItem = UIBarButtonItem( title: "Disconnect", style: .plain, @@ -58,7 +57,7 @@ final class AccountsViewController: UIViewController, UITableViewDataSource, UIT func proposePushSubscription() { let account = session.namespaces.values.first!.accounts.first! - Task(priority: .high){ try! await Push.dapp.propose(account: account, topic: session.pairingTopic)} + Task(priority: .high) { try! await Push.dapp.propose(account: account, topic: session.pairingTopic)} Push.dapp.proposalResponsePublisher.sink { result in switch result { case .success(let subscription): diff --git a/Example/DApp/Sign/Connect/ConnectView.swift b/Example/DApp/Sign/Connect/ConnectView.swift index 7004411a0..0ffbd3d23 100644 --- a/Example/DApp/Sign/Connect/ConnectView.swift +++ b/Example/DApp/Sign/Connect/ConnectView.swift @@ -31,7 +31,7 @@ final class ConnectView: UIView { return button }() - let invisibleUriLabel: UILabel = { + let invisibleUriLabel: UILabel = { let label = UILabel(frame: CGRect(origin: .zero, size: .init(width: 1, height: 1))) label.numberOfLines = 0 label.textColor = .clear diff --git a/Example/DApp/Sign/Connect/ConnectViewController.swift b/Example/DApp/Sign/Connect/ConnectViewController.swift index 02c9020f7..655a1c251 100644 --- a/Example/DApp/Sign/Connect/ConnectViewController.swift +++ b/Example/DApp/Sign/Connect/ConnectViewController.swift @@ -34,7 +34,7 @@ class ConnectViewController: UIViewController, UITableViewDataSource, UITableVie self.connectView.copyButton.isHidden = false } } - + connectView.invisibleUriLabel.text = uri.absoluteString connectView.copyButton.addTarget(self, action: #selector(copyURI), for: .touchUpInside) connectView.connectWalletButton.addTarget(self, action: #selector(connectWithExampleWallet), for: .touchUpInside) diff --git a/Example/EchoUITests/Engine/App.swift b/Example/EchoUITests/Engine/App.swift index e273bbabc..7e5cc2215 100644 --- a/Example/EchoUITests/Engine/App.swift +++ b/Example/EchoUITests/Engine/App.swift @@ -9,7 +9,7 @@ enum App { var instance: XCUIApplication { return XCUIApplication(bundleIdentifier: bundleID) } - + private var bundleID: String { switch self { case .dapp: diff --git a/Example/EchoUITests/Engine/DAppEngine.swift b/Example/EchoUITests/Engine/DAppEngine.swift index 5711ccce8..1164f27a1 100644 --- a/Example/EchoUITests/Engine/DAppEngine.swift +++ b/Example/EchoUITests/Engine/DAppEngine.swift @@ -18,7 +18,7 @@ struct DAppEngine { var accountRow: XCUIElement { instance.tables.cells.containing("0x").firstMatch } - + var methodRow: XCUIElement { instance.tables.cells.firstMatch } diff --git a/Example/EchoUITests/Engine/WalletEngine.swift b/Example/EchoUITests/Engine/WalletEngine.swift index c45d327a8..a671306be 100644 --- a/Example/EchoUITests/Engine/WalletEngine.swift +++ b/Example/EchoUITests/Engine/WalletEngine.swift @@ -8,11 +8,11 @@ struct WalletEngine { } // Onboarding - + var getStartedButton: XCUIElement { instance.buttons["Get Started"] } - + // MainScreen var pasteURIButton: XCUIElement { diff --git a/Example/EchoUITests/Extensions/XCTestCase.swift b/Example/EchoUITests/Extensions/XCTestCase.swift index f2698a34b..827c94ce1 100644 --- a/Example/EchoUITests/Extensions/XCTestCase.swift +++ b/Example/EchoUITests/Extensions/XCTestCase.swift @@ -8,11 +8,11 @@ extension XCTestCase { if alerts.buttons["Allow"].exists { alerts.buttons["Allow"].tap() } - + return true } app.swipeUp() - + self.removeUIInterruptionMonitor(pnPermission) } } diff --git a/Example/EchoUITests/Extensions/XCUIElement.swift b/Example/EchoUITests/Extensions/XCUIElement.swift index 514a23242..d9ce48169 100644 --- a/Example/EchoUITests/Extensions/XCUIElement.swift +++ b/Example/EchoUITests/Extensions/XCUIElement.swift @@ -4,7 +4,7 @@ import XCTest extension XCUIElement { static let waitTimeout: TimeInterval = 15 - + @discardableResult func wait( until expression: @escaping (XCUIElement) -> Bool, @@ -35,7 +35,7 @@ extension XCUIElement { return self } - + @discardableResult func wait( until keyPath: KeyPath, @@ -53,7 +53,7 @@ extension XCUIElement { line: line ) } - + @discardableResult func wait( until keyPath: KeyPath, diff --git a/Example/EchoUITests/Extensions/XCUIElementQuery.swift b/Example/EchoUITests/Extensions/XCUIElementQuery.swift index a92ed3a08..ffb9fa79c 100644 --- a/Example/EchoUITests/Extensions/XCUIElementQuery.swift +++ b/Example/EchoUITests/Extensions/XCUIElementQuery.swift @@ -2,7 +2,7 @@ import Foundation import XCTest extension XCUIElementQuery { - + func containing(_ text: String) -> XCUIElementQuery { let predicate = NSPredicate(format: "label CONTAINS[c] %@", text) let elementQuery = self.containing(predicate) diff --git a/Example/EchoUITests/Tests/PushNotificationTests.swift b/Example/EchoUITests/Tests/PushNotificationTests.swift index c9db0aeca..8789e2071 100644 --- a/Example/EchoUITests/Tests/PushNotificationTests.swift +++ b/Example/EchoUITests/Tests/PushNotificationTests.swift @@ -10,48 +10,48 @@ class PushNotificationTests: XCTestCase { engine.routing.launch(app: .wallet, clean: true) engine.routing.launch(app: .dapp, clean: true) } - + func testPushNotification() { - + // Initiate connection & copy URI from dApp engine.routing.activate(app: .dapp) engine.dapp.connectButton.wait(until: \.exists).tap() engine.dapp.newPairingButton.wait(until: \.exists).tap() - + // Relies on existence of invisible label with uri in Dapp let uri = engine.dapp.instance.staticTexts.containing("wc:").firstMatch.label - + engine.dapp.copyURIButton.wait(until: \.exists).tap() - + // Paste URI into Wallet & and allow connect engine.routing.activate(app: .wallet) - + allowPushNotificationsIfNeeded(app: engine.wallet.instance) - + engine.wallet.getStartedButton.wait(until: \.exists).tap() engine.wallet.pasteURIButton.wait(until: \.exists).tap() - + engine.wallet.alertUriTextField.wait(until: \.exists).tap() engine.wallet.alertUriTextField.typeText(uri) engine.wallet.alertConnectButton.wait(until: \.exists).tap() - + // Allow session engine.wallet.allowButton.wait(until: \.exists, timeout: 15, message: "No session dialog appeared").tap() - + // Trigger PN engine.routing.activate(app: .dapp) engine.dapp.accountRow.wait(until: \.exists, timeout: 15).tap() engine.dapp.methodRow.wait(until: \.exists).tap() - + // Launch springboard engine.routing.activate(app: .springboard) - + // Assert notification let notification = engine.routing.springboard.otherElements.descendants(matching: .any)["NotificationShortLookView"] notification .wait(until: \.exists, timeout: 15) .tap() - + engine.wallet.instance.wait(until: \.exists) } } diff --git a/Example/IntegrationTests/Chat/ChatTests.swift b/Example/IntegrationTests/Chat/ChatTests.swift index 2c917aa35..3532ded62 100644 --- a/Example/IntegrationTests/Chat/ChatTests.swift +++ b/Example/IntegrationTests/Chat/ChatTests.swift @@ -39,7 +39,7 @@ final class ChatTests: XCTestCase { let clientId = try! networkingInteractor.getClientId() logger.debug("My client id is: \(clientId)") - return ChatClientFactory.create(keyserverURL: keyserverURL, relayClient: relayClient, networkingInteractor: networkingInteractor, keychain: keychain, logger: logger, keyValueStorage: keyValueStorage) + return ChatClientFactory.create(keyserverURL: keyserverURL, relayClient: relayClient, networkingInteractor: networkingInteractor, keychain: keychain, logger: logger, keyValueStorage: keyValueStorage) } func testInvite() async throws { diff --git a/Example/IntegrationTests/Chat/RegistryTests.swift b/Example/IntegrationTests/Chat/RegistryTests.swift index 074251e63..c35aa1532 100644 --- a/Example/IntegrationTests/Chat/RegistryTests.swift +++ b/Example/IntegrationTests/Chat/RegistryTests.swift @@ -21,7 +21,7 @@ final class RegistryTests: XCTestCase { let keychain = KeychainStorageMock() let ksm = KeyManagementService(keychain: keychain) storage = IdentityStorage(keychain: keychain) - sut = IdentityService ( + sut = IdentityService( keyserverURL: keyserverURL, kms: ksm, storage: storage, diff --git a/Example/IntegrationTests/Pairing/PairingTests.swift b/Example/IntegrationTests/Pairing/PairingTests.swift index 4fb84f283..a955795bd 100644 --- a/Example/IntegrationTests/Pairing/PairingTests.swift +++ b/Example/IntegrationTests/Pairing/PairingTests.swift @@ -51,7 +51,7 @@ final class PairingTests: XCTestCase { let clientId = try! networkingClient.getClientId() networkingLogger.debug("My client id is: \(clientId)") - + return (pairingClient, networkingClient, keychain, keyValueStorage) } diff --git a/Example/IntegrationTests/Push/PushTests.swift b/Example/IntegrationTests/Push/PushTests.swift index d58fc905b..4c6c45cc3 100644 --- a/Example/IntegrationTests/Push/PushTests.swift +++ b/Example/IntegrationTests/Push/PushTests.swift @@ -53,7 +53,7 @@ final class PushTests: XCTestCase { let clientId = try! networkingClient.getClientId() networkingLogger.debug("My client id is: \(clientId)") - + return (pairingClient, networkingClient, keychain, keyValueStorage) } @@ -149,7 +149,6 @@ final class PushTests: XCTestCase { wait(for: [expectation], timeout: InputConfig.defaultTimeout) } - func testDeletePushSubscription() async { let expectation = expectation(description: "expects to delete push subscription") let uri = try! await dappPairingClient.create() @@ -192,7 +191,7 @@ final class PushTests: XCTestCase { walletPushClient.updateSubscriptionPublisher .sink { [unowned self] result in guard case .success(let subscription) = result else { XCTFail(); return } - let updatedScope = Set(subscription.scope.filter{ $0.value.enabled == true }.keys) + let updatedScope = Set(subscription.scope.filter { $0.value.enabled == true }.keys) XCTAssertEqual(updatedScope, updateScope) Task { try! await walletPushClient.deleteSubscription(topic: subscription.topic) } expectation.fulfill() @@ -203,7 +202,6 @@ final class PushTests: XCTestCase { } - private extension PushTests { func sign(_ message: String) -> SigningResult { let privateKey = Data(hex: "305c6cde3846927892cd32762f6120539f3ec74c9e3a16b9b798b1e85351ae2a") diff --git a/Example/IntegrationTests/Sign/SignClientTests.swift b/Example/IntegrationTests/Sign/SignClientTests.swift index 583cd886a..48ef15268 100644 --- a/Example/IntegrationTests/Sign/SignClientTests.swift +++ b/Example/IntegrationTests/Sign/SignClientTests.swift @@ -48,7 +48,7 @@ final class SignClientTests: XCTestCase { let clientId = try! networkingClient.getClientId() logger.debug("My client id is: \(clientId)") - + return ClientDelegate(client: client) } @@ -402,11 +402,11 @@ final class SignClientTests: XCTestCase { wait(for: [expectation], timeout: InputConfig.defaultTimeout) } - + func testCaip25SatisfyAllRequiredAllOptionalNamespacesSuccessful() async throws { let dappSettlementExpectation = expectation(description: "Dapp expects to settle a session") let walletSettlementExpectation = expectation(description: "Wallet expects to settle a session") - + let requiredNamespaces: [String: ProposalNamespace] = [ "eip155:1": ProposalNamespace( methods: ["personal_sign", "eth_sendTransaction"], @@ -418,7 +418,7 @@ final class SignClientTests: XCTestCase { events: ["any"] ) ] - + let optionalNamespaces: [String: ProposalNamespace] = [ "eip155:5": ProposalNamespace( methods: ["personal_sign", "eth_sendTransaction"], @@ -430,7 +430,7 @@ final class SignClientTests: XCTestCase { events: ["any"] ) ] - + let sessionProposal = Session.Proposal( id: "", pairingTopic: "", @@ -440,7 +440,7 @@ final class SignClientTests: XCTestCase { sessionProperties: nil, proposal: SessionProposal(relays: [], proposer: Participant(publicKey: "", metadata: AppMetadata(name: "", description: "", url: "", icons: [])), requiredNamespaces: [:], optionalNamespaces: [:], sessionProperties: [:]) ) - + let sessionNamespaces = try AutoNamespaces.build( sessionProposal: sessionProposal, chains: [ @@ -458,7 +458,7 @@ final class SignClientTests: XCTestCase { Account(blockchain: Blockchain("eip155:5")!, address: "0x00")! ] ) - + wallet.onSessionProposal = { [unowned self] proposal in Task(priority: .high) { do { @@ -479,11 +479,11 @@ final class SignClientTests: XCTestCase { try await wallet.client.pair(uri: uri!) wait(for: [dappSettlementExpectation, walletSettlementExpectation], timeout: InputConfig.defaultTimeout) } - + func testCaip25SatisfyAllRequiredNamespacesSuccessful() async throws { let dappSettlementExpectation = expectation(description: "Dapp expects to settle a session") let walletSettlementExpectation = expectation(description: "Wallet expects to settle a session") - + let requiredNamespaces: [String: ProposalNamespace] = [ "eip155:1": ProposalNamespace( methods: ["personal_sign", "eth_sendTransaction"], @@ -495,14 +495,14 @@ final class SignClientTests: XCTestCase { events: ["any"] ) ] - + let optionalNamespaces: [String: ProposalNamespace] = [ "eip155:5": ProposalNamespace( methods: ["personal_sign", "eth_sendTransaction"], events: ["any"] ) ] - + let sessionProposal = Session.Proposal( id: "", pairingTopic: "", @@ -512,7 +512,7 @@ final class SignClientTests: XCTestCase { sessionProperties: nil, proposal: SessionProposal(relays: [], proposer: Participant(publicKey: "", metadata: AppMetadata(name: "", description: "", url: "", icons: [])), requiredNamespaces: [:], optionalNamespaces: [:], sessionProperties: [:]) ) - + let sessionNamespaces = try AutoNamespaces.build( sessionProposal: sessionProposal, chains: [ @@ -526,7 +526,7 @@ final class SignClientTests: XCTestCase { Account(blockchain: Blockchain("eip155:137")!, address: "0x00")! ] ) - + wallet.onSessionProposal = { [unowned self] proposal in Task(priority: .high) { do { @@ -547,20 +547,20 @@ final class SignClientTests: XCTestCase { try await wallet.client.pair(uri: uri!) wait(for: [dappSettlementExpectation, walletSettlementExpectation], timeout: InputConfig.defaultTimeout) } - + func testCaip25SatisfyEmptyRequiredNamespacesExtraOptionalNamespacesSuccessful() async throws { let dappSettlementExpectation = expectation(description: "Dapp expects to settle a session") let walletSettlementExpectation = expectation(description: "Wallet expects to settle a session") - + let requiredNamespaces: [String: ProposalNamespace] = [:] - + let optionalNamespaces: [String: ProposalNamespace] = [ "eip155:5": ProposalNamespace( methods: ["personal_sign", "eth_sendTransaction"], events: ["any"] ) ] - + let sessionProposal = Session.Proposal( id: "", pairingTopic: "", @@ -570,7 +570,7 @@ final class SignClientTests: XCTestCase { sessionProperties: nil, proposal: SessionProposal(relays: [], proposer: Participant(publicKey: "", metadata: AppMetadata(name: "", description: "", url: "", icons: [])), requiredNamespaces: [:], optionalNamespaces: [:], sessionProperties: [:]) ) - + let sessionNamespaces = try AutoNamespaces.build( sessionProposal: sessionProposal, chains: [ @@ -584,7 +584,7 @@ final class SignClientTests: XCTestCase { Account(blockchain: Blockchain("eip155:5")!, address: "0x00")! ] ) - + wallet.onSessionProposal = { [unowned self] proposal in Task(priority: .high) { do { @@ -605,10 +605,10 @@ final class SignClientTests: XCTestCase { try await wallet.client.pair(uri: uri!) wait(for: [dappSettlementExpectation, walletSettlementExpectation], timeout: InputConfig.defaultTimeout) } - + func testCaip25SatisfyPartiallyRequiredNamespacesFails() async throws { let settlementFailedExpectation = expectation(description: "Dapp fails to settle a session") - + let requiredNamespaces: [String: ProposalNamespace] = [ "eip155:1": ProposalNamespace( methods: ["personal_sign", "eth_sendTransaction"], @@ -619,14 +619,14 @@ final class SignClientTests: XCTestCase { events: ["any"] ) ] - + let optionalNamespaces: [String: ProposalNamespace] = [ "eip155:5": ProposalNamespace( methods: ["personal_sign", "eth_sendTransaction"], events: ["any"] ) ] - + let sessionProposal = Session.Proposal( id: "", pairingTopic: "", @@ -636,7 +636,7 @@ final class SignClientTests: XCTestCase { sessionProperties: nil, proposal: SessionProposal(relays: [], proposer: Participant(publicKey: "", metadata: AppMetadata(name: "", description: "", url: "", icons: [])), requiredNamespaces: [:], optionalNamespaces: [:], sessionProperties: [:]) ) - + do { let sessionNamespaces = try AutoNamespaces.build( sessionProposal: sessionProposal, @@ -649,7 +649,7 @@ final class SignClientTests: XCTestCase { Account(blockchain: Blockchain("eip155:1")!, address: "0x00")! ] ) - + wallet.onSessionProposal = { [unowned self] proposal in Task(priority: .high) { do { @@ -662,15 +662,15 @@ final class SignClientTests: XCTestCase { } catch { settlementFailedExpectation.fulfill() } - + let uri = try await dapp.client.connect(requiredNamespaces: requiredNamespaces, optionalNamespaces: optionalNamespaces) try await wallet.client.pair(uri: uri!) wait(for: [settlementFailedExpectation], timeout: 1) } - + func testCaip25SatisfyPartiallyRequiredNamespacesMethodsFails() async throws { let settlementFailedExpectation = expectation(description: "Dapp fails to settle a session") - + let requiredNamespaces: [String: ProposalNamespace] = [ "eip155:1": ProposalNamespace( methods: ["personal_sign", "eth_sendTransaction"], @@ -682,14 +682,14 @@ final class SignClientTests: XCTestCase { events: ["any"] ) ] - + let optionalNamespaces: [String: ProposalNamespace] = [ "eip155:5": ProposalNamespace( methods: ["personal_sign", "eth_sendTransaction"], events: ["any"] ) ] - + let sessionProposal = Session.Proposal( id: "", pairingTopic: "", @@ -699,7 +699,7 @@ final class SignClientTests: XCTestCase { sessionProperties: nil, proposal: SessionProposal(relays: [], proposer: Participant(publicKey: "", metadata: AppMetadata(name: "", description: "", url: "", icons: [])), requiredNamespaces: [:], optionalNamespaces: [:], sessionProperties: [:]) ) - + do { let sessionNamespaces = try AutoNamespaces.build( sessionProposal: sessionProposal, @@ -714,7 +714,7 @@ final class SignClientTests: XCTestCase { Account(blockchain: Blockchain("eip155:137")!, address: "0x00")! ] ) - + wallet.onSessionProposal = { [unowned self] proposal in Task(priority: .high) { do { diff --git a/Example/PNDecryptionService/NotificationService.swift b/Example/PNDecryptionService/NotificationService.swift index 1be5f2335..aadab035e 100644 --- a/Example/PNDecryptionService/NotificationService.swift +++ b/Example/PNDecryptionService/NotificationService.swift @@ -21,8 +21,7 @@ class NotificationService: UNNotificationServiceExtension { bestAttemptContent.body = pushMessage.body contentHandler(bestAttemptContent) return - } - catch { + } catch { NSLog("echo decryption, error=%@", error.localizedDescription) bestAttemptContent.title = "" bestAttemptContent.body = "content not set" diff --git a/Example/RelayIntegrationTests/RelayClientEndToEndTests.swift b/Example/RelayIntegrationTests/RelayClientEndToEndTests.swift index 4c2331656..11da566e5 100644 --- a/Example/RelayIntegrationTests/RelayClientEndToEndTests.swift +++ b/Example/RelayIntegrationTests/RelayClientEndToEndTests.swift @@ -6,8 +6,8 @@ import Starscream @testable import WalletConnectRelay private class RelayKeychainStorageMock: KeychainStorageProtocol { - func add(_ item: T, forKey key: String) throws where T : WalletConnectKMS.GenericPasswordConvertible {} - func read(key: String) throws -> T where T : WalletConnectKMS.GenericPasswordConvertible { + func add(_ item: T, forKey key: String) throws where T: WalletConnectKMS.GenericPasswordConvertible {} + func read(key: String) throws -> T where T: WalletConnectKMS.GenericPasswordConvertible { return try T(rawRepresentation: Data()) } func delete(key: String) throws {} @@ -16,11 +16,11 @@ private class RelayKeychainStorageMock: KeychainStorageProtocol { class WebSocketFactoryMock: WebSocketFactory { private let webSocket: WebSocket - + init(webSocket: WebSocket) { self.webSocket = webSocket } - + func create(with url: URL) -> WebSocketConnecting { return webSocket } diff --git a/Example/Shared/Signer/Signer.swift b/Example/Shared/Signer/Signer.swift index f7fa459c5..54790fb65 100644 --- a/Example/Shared/Signer/Signer.swift +++ b/Example/Shared/Signer/Signer.swift @@ -6,7 +6,7 @@ final class Signer { enum Errors: Error { case notImplemented } - + private init() {} static func sign(request: Request) throws -> AnyCodable { @@ -22,7 +22,7 @@ final class Signer { case "solana_signTransaction": return SOLSigner.signTransaction(request.params) - + default: throw Signer.Errors.notImplemented } diff --git a/Example/Showcase/Classes/ApplicationLayer/SceneDelegate.swift b/Example/Showcase/Classes/ApplicationLayer/SceneDelegate.swift index 537e88926..d761c43ae 100644 --- a/Example/Showcase/Classes/ApplicationLayer/SceneDelegate.swift +++ b/Example/Showcase/Classes/ApplicationLayer/SceneDelegate.swift @@ -33,7 +33,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { guard let walletConnectUri = WalletConnectURI(string: uri) else { return } - + Task { try await Pair.instance.pair(uri: walletConnectUri) } diff --git a/Example/Showcase/Classes/PresentationLayer/Chat/ChatList/ChatListRouter.swift b/Example/Showcase/Classes/PresentationLayer/Chat/ChatList/ChatListRouter.swift index bd2d8407f..85f613e26 100644 --- a/Example/Showcase/Classes/PresentationLayer/Chat/ChatList/ChatListRouter.swift +++ b/Example/Showcase/Classes/PresentationLayer/Chat/ChatList/ChatListRouter.swift @@ -4,7 +4,7 @@ import WalletConnectChat final class ChatListRouter { weak var viewController: UIViewController! - + private let app: Application init(app: Application) { @@ -33,4 +33,3 @@ final class ChatListRouter { WelcomeModule.create(app: app).present() } } - diff --git a/Example/Showcase/Classes/PresentationLayer/Chat/ChatList/ChatListView.swift b/Example/Showcase/Classes/PresentationLayer/Chat/ChatList/ChatListView.swift index 3dc52a15f..243ab9843 100644 --- a/Example/Showcase/Classes/PresentationLayer/Chat/ChatList/ChatListView.swift +++ b/Example/Showcase/Classes/PresentationLayer/Chat/ChatList/ChatListView.swift @@ -25,7 +25,7 @@ struct ChatListView: View { Spacer() } .padding(16.0) - + if presenter.threadViewModels.isEmpty { Spacer() emptyView(size: geometry.size) diff --git a/Example/Showcase/Classes/PresentationLayer/Chat/Import/ImportPresenter.swift b/Example/Showcase/Classes/PresentationLayer/Chat/Import/ImportPresenter.swift index 9987116c2..2f62fa910 100644 --- a/Example/Showcase/Classes/PresentationLayer/Chat/Import/ImportPresenter.swift +++ b/Example/Showcase/Classes/PresentationLayer/Chat/Import/ImportPresenter.swift @@ -19,7 +19,7 @@ final class ImportPresenter: ObservableObject { func didPressWeb3Modal() async throws { router.presentWeb3Modal() } - + @MainActor func didPressImport() async throws { guard let importAccount = ImportAccount(input: input) diff --git a/Example/Showcase/Classes/PresentationLayer/Chat/Import/ImportRouter.swift b/Example/Showcase/Classes/PresentationLayer/Chat/Import/ImportRouter.swift index 512dc95da..c0993af7a 100644 --- a/Example/Showcase/Classes/PresentationLayer/Chat/Import/ImportRouter.swift +++ b/Example/Showcase/Classes/PresentationLayer/Chat/Import/ImportRouter.swift @@ -11,7 +11,7 @@ final class ImportRouter { init(app: Application) { self.app = app } - + func presentWeb3Modal() { Web3ModalSheetController( projectId: InputConfig.projectId, diff --git a/Example/Showcase/Classes/PresentationLayer/Chat/Import/ImportView.swift b/Example/Showcase/Classes/PresentationLayer/Chat/Import/ImportView.swift index 9e0584723..0a5bd6b38 100644 --- a/Example/Showcase/Classes/PresentationLayer/Chat/Import/ImportView.swift +++ b/Example/Showcase/Classes/PresentationLayer/Chat/Import/ImportView.swift @@ -16,11 +16,11 @@ struct ImportView: View { Spacer() VStack { - + // BrandButton(title: "Web3Modal") { // try await presenter.didPressWeb3Modal() // } - + BrandButton(title: "Ok, done" ) { try await presenter.didPressImport() } diff --git a/Example/Showcase/Classes/PresentationLayer/Chat/Main/MainPresenter.swift b/Example/Showcase/Classes/PresentationLayer/Chat/Main/MainPresenter.swift index fc52791a8..d029480ba 100644 --- a/Example/Showcase/Classes/PresentationLayer/Chat/Main/MainPresenter.swift +++ b/Example/Showcase/Classes/PresentationLayer/Chat/Main/MainPresenter.swift @@ -13,7 +13,7 @@ final class MainPresenter { var viewControllers: [UIViewController] { return [ router.chatViewController(account: importAccount.account), - router.web3InboxViewController(importAccount: importAccount), + router.web3InboxViewController(importAccount: importAccount) ] } diff --git a/Example/Showcase/Classes/PresentationLayer/Chat/Welcome/WelcomeInteractor.swift b/Example/Showcase/Classes/PresentationLayer/Chat/Welcome/WelcomeInteractor.swift index 318dce292..ef1a57ce8 100644 --- a/Example/Showcase/Classes/PresentationLayer/Chat/Welcome/WelcomeInteractor.swift +++ b/Example/Showcase/Classes/PresentationLayer/Chat/Welcome/WelcomeInteractor.swift @@ -7,7 +7,7 @@ import Auth final class WelcomeInteractor { private var disposeBag = Set() - + private let chatService: ChatService private let accountStorage: AccountStorage @@ -27,7 +27,7 @@ final class WelcomeInteractor { func trackConnection() -> Stream { return chatService.connectionPublisher } - + func generateUri() async -> WalletConnectURI { return try! await Pair.instance.create() } diff --git a/Example/Showcase/Classes/PresentationLayer/Chat/Welcome/WelcomePresenter.swift b/Example/Showcase/Classes/PresentationLayer/Chat/Welcome/WelcomePresenter.swift index db4e676f4..a89d9755f 100644 --- a/Example/Showcase/Classes/PresentationLayer/Chat/Welcome/WelcomePresenter.swift +++ b/Example/Showcase/Classes/PresentationLayer/Chat/Welcome/WelcomePresenter.swift @@ -33,6 +33,6 @@ final class WelcomePresenter: ObservableObject { private extension WelcomePresenter { func setupInitialState() { - + } } diff --git a/Example/Showcase/Classes/PresentationLayer/Chat/Welcome/WelcomeRouter.swift b/Example/Showcase/Classes/PresentationLayer/Chat/Welcome/WelcomeRouter.swift index da574fb23..da9910f8a 100644 --- a/Example/Showcase/Classes/PresentationLayer/Chat/Welcome/WelcomeRouter.swift +++ b/Example/Showcase/Classes/PresentationLayer/Chat/Welcome/WelcomeRouter.swift @@ -20,7 +20,7 @@ final class WelcomeRouter { MainModule.create(app: app, importAccount: importAccount) .present() } - + func openWallet(uri: String) { UIApplication.shared.open(URL(string: "walletapp://wc?uri=\(uri)")!) } diff --git a/Example/Showcase/Common/Components/BrandButton.swift b/Example/Showcase/Common/Components/BrandButton.swift index 6fee139db..c80bcae36 100644 --- a/Example/Showcase/Common/Components/BrandButton.swift +++ b/Example/Showcase/Common/Components/BrandButton.swift @@ -21,5 +21,3 @@ struct BrandButton: View { } } } - - diff --git a/Example/Showcase/Common/Components/PlainButton.swift b/Example/Showcase/Common/Components/PlainButton.swift index 1baa3cb9c..1ca629dbd 100644 --- a/Example/Showcase/Common/Components/PlainButton.swift +++ b/Example/Showcase/Common/Components/PlainButton.swift @@ -1,7 +1,7 @@ import SwiftUI import AsyncButton -struct PlainButton