We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1bed846 commit 04b3cfeCopy full SHA for 04b3cfe
Sources/Web3Core/Utility/Utilities.swift
@@ -19,17 +19,17 @@ public struct Utilities {
19
guard let decompressedKey = SECP256K1.combineSerializedPublicKeys(keys: [publicKey], outputCompressed: false) else {return nil}
20
return publicToAddressData(decompressedKey)
21
}
22
- var stipped = publicKey
23
- if stipped.count == 65 {
24
- if stipped[0] != 4 {
+ var stripped = publicKey
+ if stripped.count == 65 {
+ if stripped[0] != 4 {
25
return nil
26
27
- stipped = stipped[1...64]
+ stripped = stripped[1...64]
28
29
- if stipped.count != 64 {
+ if stripped.count != 64 {
30
31
32
- let sha3 = stipped.sha3(.keccak256)
+ let sha3 = stripped.sha3(.keccak256)
33
let addressData = sha3[12...31]
34
return addressData
35
0 commit comments