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

Mixpanel in w3w fix #1247

Merged
merged 2 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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