Skip to content

Commit

Permalink
Update profile link to use mintscan (#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruixhuang authored Jan 14, 2025
1 parent b6e783a commit b1baa0b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ class dydxProfileHeaderViewPresenter: HostedViewPresenter<dydxProfileHeaderViewM
} else {
self?.viewModel?.copyAction = nil
}
if let ethereumAddress = walletState.currentWallet?.ethereumAddress {
if let cosmoAddress = walletState.currentWallet?.cosmoAddress,
let mintscanBase = AbacusStateManager.shared.environment?.links?.mintscanBase {
self?.viewModel?.openInEtherscanAction = {
let urlString = "https://etherscan.io/address/\(ethereumAddress)"
let urlString = "\(mintscanBase)/address/\(cosmoAddress)"
if let url = URL(string: urlString), URLHandler.shared?.canOpenURL(url) ?? false {
URLHandler.shared?.open(url, completionHandler: nil)
}
Expand Down

0 comments on commit b1baa0b

Please sign in to comment.