Skip to content

Commit 29fff74

Browse files
fix: added initializer for the Web3EthMock
1 parent ff0778b commit 29fff74

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Tests/web3swiftTests/localTests/Mocks.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ import Foundation
99
@testable import Core
1010

1111
class Web3EthMock: IEth {
12+
let provider: Web3Provider
13+
1214
var onCallTransaction: ((CodableTransaction) -> Data)?
1315

16+
init(provider: Web3Provider) {
17+
self.provider = provider
18+
}
19+
1420
func callTransaction(_ transaction: CodableTransaction) async throws -> Data {
1521
onCallTransaction?(transaction) ?? Data()
1622
}

0 commit comments

Comments
 (0)