Skip to content

Commit

Permalink
Merge pull request #1247 from WalletConnect/add-mixpanel-to-w3w
Browse files Browse the repository at this point in the history
Mixpanel in w3w fix
  • Loading branch information
llbartekll authored Dec 1, 2023
2 parents aee8c77 + 0783f0f commit 889d44d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/WalletConnectPairing/PairingClientFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public struct PairingClientFactory {
let kms = KeyManagementService(keychain: keychainStorage)
let history = RPCHistoryFactory.createForNetwork(keyValueStorage: keyValueStorage)
let appPairService = AppPairService(networkingInteractor: networkingClient, kms: kms, pairingStorage: pairingStore)
let walletPairService = WalletPairService(networkingInteractor: networkingClient, kms: kms, pairingStorage: pairingStore, history: history)
let walletPairService = WalletPairService(networkingInteractor: networkingClient, kms: kms, pairingStorage: pairingStore, history: history, logger: logger)
let pairingRequestsSubscriber = PairingRequestsSubscriber(networkingInteractor: networkingClient, pairingStorage: pairingStore, logger: logger)
let pairingsProvider = PairingsProvider(pairingStorage: pairingStore)
let cleanupService = PairingCleanupService(pairingStore: pairingStore, kms: kms)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final class WalletPairServiceTestsTests: XCTestCase {
storageMock = WCPairingStorageMock()
cryptoMock = KeyManagementServiceMock()
rpcHistory = RPCHistoryFactory.createForNetwork(keyValueStorage: RuntimeKeyValueStorage())
service = WalletPairService(networkingInteractor: networkingInteractor, kms: cryptoMock, pairingStorage: storageMock, history: rpcHistory)
service = WalletPairService(networkingInteractor: networkingInteractor, kms: cryptoMock, pairingStorage: storageMock, history: rpcHistory, logger: ConsoleLoggerMock())
}

func testPairWhenNetworkNotConnectedThrows() async {
Expand Down
6 changes: 6 additions & 0 deletions Tests/Web3WalletTests/Mocks/PairingClientMock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ import Combine
@testable import WalletConnectPairing

final class PairingClientMock: PairingClientProtocol {
private var logsSubject = PassthroughSubject<WalletConnectUtils.Log, Never>()

var logsPublisher: AnyPublisher<WalletConnectUtils.Log, Never> {
return logsSubject.eraseToAnyPublisher()
}

var pairCalled = false
var disconnectPairingCalled = false

Expand Down
5 changes: 5 additions & 0 deletions Tests/Web3WalletTests/Mocks/SignClientMock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import Combine
@testable import WalletConnectSign

final class SignClientMock: SignClientProtocol {
private var logsSubject = PassthroughSubject<WalletConnectUtils.Log, Never>()

var logsPublisher: AnyPublisher<WalletConnectUtils.Log, Never> {
return logsSubject.eraseToAnyPublisher()
}
var approveCalled = false
var rejectCalled = false
var updateCalled = false
Expand Down

0 comments on commit 889d44d

Please sign in to comment.