Skip to content

Commit

Permalink
Rerun swiftformat
Browse files Browse the repository at this point in the history
  • Loading branch information
esen committed Apr 26, 2024
1 parent c31c2e6 commit 96a146b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Combine
import MarketKit
import SwiftUI
import ThemeKit
import Combine

class AppearanceViewModel: ObservableObject {
private var cancellables = Set<AnyCancellable>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class MainSettingsViewController: ThemeViewController {

title = "settings.title".localized
navigationItem.backBarButtonItem = UIBarButtonItem(title: title, style: .plain, target: nil, action: nil)

tableView.registerHeaderFooter(forClass: HighlightedSubtitleHeaderFooterView.self)
tableView.sectionDataSource = self

Expand Down Expand Up @@ -283,7 +283,7 @@ class MainSettingsViewController: ThemeViewController {

stat(page: .settings, event: .open(page: .appearance))
}
)
),
]
}

Expand Down Expand Up @@ -571,7 +571,8 @@ class HighlightedSubtitleHeaderFooterView: UITableViewHeaderFooterView {
label.textColor = .themeGray
}

required public init?(coder aDecoder: NSCoder) {
@available(*, unavailable)
public required init?(coder _: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

Expand All @@ -580,5 +581,4 @@ class HighlightedSubtitleHeaderFooterView: UITableViewHeaderFooterView {
label.textColor = color
backgroundView?.backgroundColor = backgroundColor
}

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Combine
import CryptoSwift
import Foundation
import HsCryptoKit
import HsToolKit
import RxRelay
import RxSwift
Expand All @@ -12,7 +13,6 @@ import WalletConnectRelay
import WalletConnectSign
import WalletConnectUtils
import Web3Wallet
import HsCryptoKit

extension Starscream.WebSocket: WebSocketConnecting {}

Expand Down Expand Up @@ -73,7 +73,7 @@ class WalletConnectService {
setUpAuthSubscribing()

connectionService.relayClient = Networking.instance

updateSessions()
updatePairings()
}
Expand Down Expand Up @@ -192,7 +192,7 @@ extension WalletConnectService {

// works with pending requests
public var pendingRequests: [WalletConnectSign.Request] {
Web3Wallet.instance.getPendingRequests().map { $0.request }
Web3Wallet.instance.getPendingRequests().map(\.request)
}

public var pendingRequestsUpdatedObservable: Observable<Void> {
Expand Down Expand Up @@ -383,13 +383,12 @@ extension WalletConnectSign.SocketConnectionStatus {
}

struct DefaultCryptoProvider: CryptoProvider {

public func recoverPubKey(signature: EthereumSignature, message: Data) throws -> Data {
let signature = Data(signature.r + signature.s + [signature.v])
let messageHash = keccak256(message)
var pubKey = HsCryptoKit.Crypto.ellipticPublicKey(signature: signature, of: messageHash, compressed: false)
pubKey?.remove(at: 0)

return pubKey ?? Data()
}

Expand All @@ -398,5 +397,4 @@ struct DefaultCryptoProvider: CryptoProvider {
let hash = digest.calculate(for: [UInt8](data))
return Data(hash)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import HsToolKit
import RxCocoa
import RxRelay
import RxSwift
import UIKit
import WalletConnectRelay
import WalletConnectSign
import WalletConnectUtils
import Web3Wallet
import UIKit

class WalletConnectSocketConnectionService {
private static let retryInterval = 10
Expand Down

0 comments on commit 96a146b

Please sign in to comment.