Skip to content

Commit

Permalink
fix: open url to transaction on external explorer
Browse files Browse the repository at this point in the history
  • Loading branch information
reez committed Oct 13, 2024
1 parent a908959 commit 4e1ccea
Showing 1 changed file with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,21 @@ class TransactionDetailViewModel {

func getEsploraUrl() {
let savedEsploraURL = bdkClient.getEsploraURL()
if network == "Signet" {
self.esploraURL = "https://mempool.space/signet"
} else {

switch network {
case "signet":
if savedEsploraURL == Constants.Config.EsploraServerURLNetwork.Signet.bdk {
self.esploraURL = "https://mempool.space/signet"
} else {
self.esploraURL = "https://mutinynet.com"
}
case "testnet":
if savedEsploraURL == Constants.Config.EsploraServerURLNetwork.Testnet.blockstream {
self.esploraURL = "https://blockstream.info/testnet"
} else {
self.esploraURL = "https://mempool.space/testnet"
}
default:
self.esploraURL = savedEsploraURL
}
}
Expand Down

0 comments on commit 4e1ccea

Please sign in to comment.