Skip to content

Commit fd931fa

Browse files
chore(typos): fix typos #795 from stavares843/develop
2 parents 9746b23 + 7ce0ab6 commit fd931fa

File tree

7 files changed

+27
-27
lines changed

7 files changed

+27
-27
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
- Update libs versions, Cartfile and Pods dependencies [\#334](https://github.com/skywinder/web3swift/pull/334) ([AnnaYatsun1](https://github.com/AnnaYatsun1))
163163
- fix crash when 'payable' nil [\#332](https://github.com/skywinder/web3swift/pull/332) ([xdozorx](https://github.com/xdozorx))
164164
- Update README.md [\#331](https://github.com/skywinder/web3swift/pull/331) ([Iysbaera](https://github.com/Iysbaera))
165-
- CrytoSwift update version 1.4.0 [\#327](https://github.com/skywinder/web3swift/pull/327) ([lzttxs](https://github.com/lzttxs))
165+
- CryptoSwift update version 1.4.0 [\#327](https://github.com/skywinder/web3swift/pull/327) ([lzttxs](https://github.com/lzttxs))
166166
- Update carthage libraries [\#325](https://github.com/skywinder/web3swift/pull/325) ([alex78pro](https://github.com/alex78pro))
167167
- Gas estimate fix [\#324](https://github.com/skywinder/web3swift/pull/324) ([frostiq](https://github.com/frostiq))
168168
- Update README.md [\#306](https://github.com/skywinder/web3swift/pull/306) ([manuG420](https://github.com/manuG420))
@@ -252,7 +252,7 @@
252252
- received transaction id from geth node server but not able to see that transaction id at etherscan.io [\#200](https://github.com/skywinder/web3swift/issues/200)
253253
- How do I fetch information such as balance, decimal,symbol and name of ERC20token ? [\#199](https://github.com/skywinder/web3swift/issues/199)
254254
- Starscream 3.1.0 not compatible with Swift 5.0 [\#195](https://github.com/skywinder/web3swift/issues/195)
255-
- How to Connect infuraWebsocket and subsribe particular event in swift? [\#193](https://github.com/skywinder/web3swift/issues/193)
255+
- How to Connect infuraWebsocket and subscribe particular event in swift? [\#193](https://github.com/skywinder/web3swift/issues/193)
256256
- Use of unresolved identifier 'Wallet' [\#192](https://github.com/skywinder/web3swift/issues/192)
257257
- V in Signed Message Hash not being calculated properly [\#191](https://github.com/skywinder/web3swift/issues/191)
258258
- Not possible to calculate fast, normal and cheap transaction fee ? [\#190](https://github.com/skywinder/web3swift/issues/190)

Example/myWeb3Wallet/myWeb3Wallet/ViewControllers/WalletController/WalletViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class WalletViewController: UIViewController {
102102
}
103103
} catch {
104104
#if DEBUG
105-
print("error creating keyStrore")
105+
print("error creating keyStore")
106106
print("Private key error.")
107107
#endif
108108
let alert = UIAlertController(title: "Error", message: "Please enter correct Private key", preferredStyle: .alert)

Sources/Web3Core/EthereumNetwork/RequestParameter/RequestParameter+RawRepresentable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ extension RequestParameter: RawRepresentable {
1313
/// to encode mixed type values array in JSON.
1414
///
1515
/// This protocol is used to implement custom `encode` method for that enum,
16-
/// which encodes an array of self-assosiated values.
16+
/// which encodes an array of self-associated values.
1717
///
1818
/// You're totally free to use explicit and more convenience member init as `RequestParameter.int(12)` in your code.
1919
/// - Parameter rawValue: one of the supported types like `Int`, `UInt` etc.

Sources/Web3Core/Structure/SECP256k1.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,11 @@ extension SECP256K1 {
189189
} else if v >= 35 && v <= 38 {
190190
v -= 35
191191
}
192-
let result = serializedSignature.withUnsafeBytes { (serRawBufferPtr: UnsafeRawBufferPointer) -> Int32? in
193-
if let serRawPtr = serRawBufferPtr.baseAddress, serRawBufferPtr.count > 0 {
194-
let serPtr = serRawPtr.assumingMemoryBound(to: UInt8.self)
192+
let result = serializedSignature.withUnsafeBytes { (rawBufferPtr: UnsafeRawBufferPointer) -> Int32? in
193+
if let rawPtr = rawBufferPtr.baseAddress, rawBufferPtr.count > 0 {
194+
let ptr = rawPtr.assumingMemoryBound(to: UInt8.self)
195195
return withUnsafeMutablePointer(to: &recoverableSignature) { (signaturePointer: UnsafeMutablePointer<secp256k1_ecdsa_recoverable_signature>) -> Int32 in
196-
let res = secp256k1_ecdsa_recoverable_signature_parse_compact(context, signaturePointer, serPtr, v)
196+
let res = secp256k1_ecdsa_recoverable_signature_parse_compact(context, signaturePointer, ptr, v)
197197
return res
198198
}
199199
} else {
@@ -210,12 +210,12 @@ extension SECP256K1 {
210210
guard let context = context else { return nil }
211211
var serializedSignature = Data(repeating: 0x00, count: 64)
212212
var v: Int32 = 0
213-
let result = serializedSignature.withUnsafeMutableBytes { (serSignatureRawBufferPointer: UnsafeMutableRawBufferPointer) -> Int32? in
214-
if let serSignatureRawPointer = serSignatureRawBufferPointer.baseAddress, serSignatureRawBufferPointer.count > 0 {
215-
let serSignaturePointer = serSignatureRawPointer.assumingMemoryBound(to: UInt8.self)
213+
let result = serializedSignature.withUnsafeMutableBytes { (signatureRawBufferPointer: UnsafeMutableRawBufferPointer) -> Int32? in
214+
if let signatureRawPointer = signatureRawBufferPointer.baseAddress, signatureRawBufferPointer.count > 0 {
215+
let typedSignaturePointer = signatureRawPointer.assumingMemoryBound(to: UInt8.self)
216216
return withUnsafePointer(to: &recoverableSignature) { (signaturePointer: UnsafePointer<secp256k1_ecdsa_recoverable_signature>) -> Int32 in
217217
withUnsafeMutablePointer(to: &v) { (vPtr: UnsafeMutablePointer<Int32>) -> Int32 in
218-
let res = secp256k1_ecdsa_recoverable_signature_serialize_compact(context, serSignaturePointer, vPtr, signaturePointer)
218+
let res = secp256k1_ecdsa_recoverable_signature_serialize_compact(context, typedSignaturePointer, vPtr, signaturePointer)
219219
return res
220220
}
221221
}

Sources/web3swift/Tokens/ST20/Web3+SecurityToken.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ protocol ISecurityToken: IST20, IOwnable {
5454
/// Queries balances as of a defined checkpoint
5555
func balanceOfAt(investor: EthereumAddress, checkpointId: BigUInt) async throws -> BigUInt
5656

57-
/// Creates a checkpoint that can be used to query historical balances / totalSuppy
57+
/// Creates a checkpoint that can be used to query historical balances / totalSupply
5858
func createCheckpoint(from: EthereumAddress) async throws -> WriteOperation
5959

6060
/// gets length of investors array

Sources/web3swift/Utils/EIP/EIP681.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ extension Web3 {
6262
switch targetAddress {
6363
case .ethereumAddress(let ethereumAddress):
6464
address = ethereumAddress.address
65-
case let .ensAddress(ensAdress):
66-
address = ensAdress
65+
case let .ensAddress(ensAddress):
66+
address = ensAddress
6767
}
6868
var link = "ethereum:\(address)\(chainID != nil ? "@\(chainID!.description)" : "")"
6969
if let functionName = functionName, !functionName.isEmpty {
@@ -431,14 +431,14 @@ extension Web3 {
431431
var nativeValueArray: [Any] = []
432432

433433
for value in rawValues {
434-
let intermidiateValue = await parseFunctionArgument(type,
434+
let intermediateValue = await parseFunctionArgument(type,
435435
value,
436436
chainID: chainID,
437437
inputNumber: inputNumber)?
438438
.parameter
439439
.value
440-
if let intermidiateValue = intermidiateValue {
441-
nativeValueArray.append(intermidiateValue)
440+
if let intermediateValue = intermediateValue {
441+
nativeValueArray.append(intermediateValue)
442442
}
443443
}
444444
nativeValue = nativeValueArray

Sources/web3swift/Web3/Web3+EIP1559.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public extension Web3 {
138138
/// Block number: 13_773_000
139139
case ArrowGlacier
140140

141-
var mainNetFisrtBlockNumber: BigUInt {
141+
var mainNetFirstBlockNumber: BigUInt {
142142
switch self {
143143
case .Byzantium: return 4_370_000
144144
case .Constantinople: return 7_280_000
@@ -154,28 +154,28 @@ public extension Web3 {
154154
static func getChainVersion(of block: BigUInt) -> MainChainVersion {
155155
// Iterate given block number over each ChainVersion block numbers
156156
// to get the block's ChainVersion.
157-
if block < MainChainVersion.Constantinople.mainNetFisrtBlockNumber {
157+
if block < MainChainVersion.Constantinople.mainNetFirstBlockNumber {
158158
return .Byzantium
159159
// ~= means included in a given range
160-
} else if MainChainVersion.Constantinople.mainNetFisrtBlockNumber..<MainChainVersion.Istanbul.mainNetFisrtBlockNumber ~= block {
160+
} else if MainChainVersion.Constantinople.mainNetFirstBlockNumber..<MainChainVersion.Istanbul.mainNetFirstBlockNumber ~= block {
161161
return .Constantinople
162-
} else if MainChainVersion.Istanbul.mainNetFisrtBlockNumber..<MainChainVersion.MuirGlacier.mainNetFisrtBlockNumber ~= block {
162+
} else if MainChainVersion.Istanbul.mainNetFirstBlockNumber..<MainChainVersion.MuirGlacier.mainNetFirstBlockNumber ~= block {
163163
return .Istanbul
164-
} else if MainChainVersion.MuirGlacier.mainNetFisrtBlockNumber..<MainChainVersion.Berlin.mainNetFisrtBlockNumber ~= block {
164+
} else if MainChainVersion.MuirGlacier.mainNetFirstBlockNumber..<MainChainVersion.Berlin.mainNetFirstBlockNumber ~= block {
165165
return .MuirGlacier
166-
} else if MainChainVersion.Berlin.mainNetFisrtBlockNumber..<MainChainVersion.London.mainNetFisrtBlockNumber ~= block {
166+
} else if MainChainVersion.Berlin.mainNetFirstBlockNumber..<MainChainVersion.London.mainNetFirstBlockNumber ~= block {
167167
return .Berlin
168-
} else if MainChainVersion.London.mainNetFisrtBlockNumber..<MainChainVersion.ArrowGlacier.mainNetFisrtBlockNumber ~= block {
168+
} else if MainChainVersion.London.mainNetFirstBlockNumber..<MainChainVersion.ArrowGlacier.mainNetFirstBlockNumber ~= block {
169169
return .London
170-
} else if block >= MainChainVersion.ArrowGlacier.mainNetFisrtBlockNumber {
170+
} else if block >= MainChainVersion.ArrowGlacier.mainNetFirstBlockNumber {
171171
// Pass to the default return.
172172
}
173173
return .ArrowGlacier
174174
}
175175
}
176176

177177
extension Web3.MainChainVersion: Comparable {
178-
public static func < (lhs: Web3.MainChainVersion, rhs: Web3.MainChainVersion) -> Bool { return lhs.mainNetFisrtBlockNumber < rhs.mainNetFisrtBlockNumber }
178+
public static func < (lhs: Web3.MainChainVersion, rhs: Web3.MainChainVersion) -> Bool { return lhs.mainNetFirstBlockNumber < rhs.mainNetFirstBlockNumber }
179179
}
180180

181181
extension Block {

0 commit comments

Comments
 (0)