Skip to content

Commit

Permalink
self codereview fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bnsports committed Aug 1, 2024
1 parent 2bbdfa0 commit fd4449b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion fearless/Common/Extension/FWCosmosView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class FWCosmosView: CosmosView {

enum FWCosmosTouchTarget {
static func optimize(_ bounds: CGRect) -> CGRect {
let recommendedHitSize: CGFloat = 60
let recommendedHitSize: CGFloat = 44

var hitWidthIncrease: CGFloat = recommendedHitSize - bounds.width
var hitHeightIncrease: CGFloat = recommendedHitSize - bounds.height
Expand Down
13 changes: 4 additions & 9 deletions fearless/Common/Services/ChainRegistry/ChainRegistry.swift
Original file line number Diff line number Diff line change
Expand Up @@ -228,21 +228,16 @@ final class ChainRegistry {
}
chains.append(newChain)

DispatchQueue.global(qos: .background).async {
_ = try? ethereumConnectionPool.setupConnection(for: newChain)
}
_ = try? ethereumConnectionPool.setupConnection(for: newChain)
}

private func handleUpdatedEthereumChain(updatedChain: ChainModel) throws {
guard let ethereumConnectionPool = self.ethereumConnectionPool else {
return
}
DispatchQueue.global(qos: .background).async { [weak self] in
guard let self else { return }
_ = try? ethereumConnectionPool.setupConnection(for: updatedChain)
self.chains = self.chains.filter { $0.chainId != updatedChain.chainId }
self.chains.append(updatedChain)
}
_ = try? ethereumConnectionPool.setupConnection(for: updatedChain)
chains = chains.filter { $0.chainId != updatedChain.chainId }
chains.append(updatedChain)
}

private func handleDeletedEthereumChain(chainId: ChainModel.Id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ final class PolkaswapAdjustmentAssembly {
let chainRegistry = ChainRegistryFacade.sharedRegistry

guard
let xorChainAsset = chainRegistry.getChainUnsafe(for: Chain.soraMain.genesisHash)?.utilityChainAssets().first,
let xorChainAsset = chainRegistry.getChain(for: Chain.soraMain.genesisHash)?.utilityChainAssets().first,
let connection = chainRegistry.getConnection(for: xorChainAsset.chain.chainId),
let accountResponse = wallet.fetch(for: xorChainAsset.chain.accountRequest()),
let runtimeService = chainRegistry.getRuntimeProvider(for: xorChainAsset.chain.chainId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ final class WalletMainContainerViewLayout: UIView {
}

private func setupWalletBalanceLayout() {
addSubview(accountScoreView)
insertSubview(accountScoreView, belowSubview: navigationContainerView)
accountScoreView.snp.makeConstraints { make in
make.top.equalTo(navigationContainerView.snp.bottom).offset(4)
make.centerX.equalTo(switchWalletButton.snp.centerX)
Expand Down

0 comments on commit fd4449b

Please sign in to comment.