Skip to content

Commit

Permalink
fix tests build
Browse files Browse the repository at this point in the history
  • Loading branch information
llbartekll committed Dec 1, 2023
1 parent e80f0bb commit 0783f0f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
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 0783f0f

Please sign in to comment.