Skip to content

Commit

Permalink
Merge pull request #543 from cosmostation/APP-1017-FixUI
Browse files Browse the repository at this point in the history
Update ExplorerBtn Title / token search by contract
  • Loading branch information
wannabit-yongjoo authored Nov 19, 2024
2 parents 22bf103 + a5d2a50 commit 2ec4c24
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions Cosmostation/Controller/Main/GenTx/CommonTransferResult.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,13 @@ class CommonTransferResult: BaseVC, AddressBookDelegate {

} else if (txStyle == .COSMOS_STYLE) {
successMsgLabel.text = cosmosBroadcastTxResponse?.txhash
successExplorerBtn.setTitle("Check in Mintscan", for: .normal)
failExplorerBtn.setTitle("Check in Mintscan", for: .normal)
if fromChain.isSupportMintscan() {
successExplorerBtn.setTitle("Check in Mintscan", for: .normal)
failExplorerBtn.setTitle("Check in Mintscan", for: .normal)
} else {
successExplorerBtn.setTitle("Check in Explorer", for: .normal)
failExplorerBtn.setTitle("Check in Explorer", for: .normal)
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ class SelectDisplayTokenListSheet: BaseVC, UISearchBarDelegate{
func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) {
if selectedChain.isSupportCw20() && selectedChain.isSupportErc20() {
searchTokens = searchText.isEmpty ? allTokens.filter { $0.type == tokenType[segment.selectedSegmentIndex] } : allTokens.filter({ $0.type == tokenType[segment.selectedSegmentIndex] }).filter { token in
return token.symbol!.range(of: searchText, options: .caseInsensitive, range: nil, locale: nil) != nil
return token.symbol!.range(of: searchText, options: .caseInsensitive, range: nil, locale: nil) != nil || token.contract?.range(of: searchText, options: .caseInsensitive) != nil
}
} else {
searchTokens = searchText.isEmpty ? allTokens : allTokens.filter { token in
return token.symbol!.range(of: searchText, options: .caseInsensitive, range: nil, locale: nil) != nil
return token.symbol!.range(of: searchText, options: .caseInsensitive, range: nil, locale: nil) != nil || token.contract?.range(of: searchText, options: .caseInsensitive) != nil
}
}
sheetTableView.reloadData()
Expand Down

0 comments on commit 2ec4c24

Please sign in to comment.