Skip to content

Commit

Permalink
Fix wallet connection.
Browse files Browse the repository at this point in the history
Revert swap functional.
  • Loading branch information
ant013 committed Aug 23, 2023
1 parent 52e73dd commit 3ce98ce
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class EvmTransactionsAdapter: BaseEvmAdapter {
case .all: ()
case .incoming: type = .incoming
case .outgoing: type = .outgoing
// case .swap: type = .swap
case .swap: type = .swap
case .approve: type = .approve
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class TronTransactionsAdapter: BaseTronAdapter {
case .all: ()
case .incoming: type = .incoming
case .outgoing: type = .outgoing
// case .swap: type = .swap
case .swap: type = .swap
case .approve: type = .approve
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
enum TransactionTypeFilter: String, CaseIterable {
// case all, incoming, outgoing, swap, approve
case all, incoming, outgoing, approve
case all, incoming, outgoing, swap, approve
// case all, incoming, outgoing, approve
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class WalletConnectV2ListView {
.image32 { component in
component.imageView.cornerRadius = .cornerRadius8
component.imageView.layer.cornerCurve = .continuous
component.imageView.contentMode = .scaleAspectFit
component.setImage(urlString: viewItem.imageUrl, placeholder: UIImage(named: "placeholder_rectangle_32"))
},
.vStackCentered([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ extension WalletConnectV2MainService: IWalletConnectMainService {
}

let accounts = chains.compactMap { chain in
if let firstBlockchainItem = blockchains.items.first,
if let firstBlockchainItem = blockchains.items.first(where: { item in item.chainId == chain.id }),
let wcBlockchain = WalletConnectUtils.Blockchain(namespace: firstBlockchainItem.namespace, reference: chain.id.description),
let wcAccount = WalletConnectUtils.Account(blockchain: wcBlockchain, address: firstBlockchainItem.address) {
return wcAccount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class WalletConnectV2PairingViewController: ThemeViewController {
.image32 { component in
component.imageView.layer.cornerCurve = .continuous
component.imageView.cornerRadius = .cornerRadius8
component.imageView.contentMode = .scaleAspectFit
component.setImage(urlString: viewItem.imageUrl, placeholder: UIImage(named: "placeholder_rectangle_32"))
},
.vStackCentered([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ class LogoHeaderCell: UITableViewCell {
maker.size.equalTo(Self.logoSize)
}

logoImageView.contentMode = .scaleAspectFill
logoImageView.contentMode = .scaleAspectFit
logoImageView.cornerRadius = .cornerRadius16
logoImageView.layer.cornerCurve = .continuous
logoImageView.clipsToBounds = true
logoImageView.backgroundColor = .themeSteel20
logoImageView.backgroundColor = .clear

contentView.addSubview(stackView)
stackView.snp.makeConstraints { maker in
Expand Down Expand Up @@ -76,8 +76,8 @@ class LogoHeaderCell: UITableViewCell {
}
}

func set(imageUrl: String?, placeholderImage: UIImage? = nil) {
logoImageView.kf.setImage(with: imageUrl.flatMap { URL(string: $0) }, placeholder: placeholderImage)
func set(imageUrl: String?) {
logoImageView.kf.setImage(with: imageUrl.flatMap { URL(string: $0) }, placeholder: UIImage(named: "placeholder_rectangle_32"))
}

}
Expand Down

0 comments on commit 3ce98ce

Please sign in to comment.