mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-20 02:28:56 +00:00
fix(@browser): Fix etherscan link
fixes #4786 fixes #5014 also fixed simpledapp.eth due to need to resolve previous issue
This commit is contained in:
parent
a910a3e801
commit
6e453dbbba
@ -1,4 +1,4 @@
|
|||||||
import NimQml
|
import NimQml, strutils
|
||||||
|
|
||||||
import ./io_interface
|
import ./io_interface
|
||||||
|
|
||||||
@ -61,4 +61,11 @@ QtObject:
|
|||||||
|
|
||||||
proc ensResourceURL*(self: View, ens: string, url: string): string {.slot.} =
|
proc ensResourceURL*(self: View, ens: string, url: string): string {.slot.} =
|
||||||
let (url, base, http_scheme, path_prefix, hasContentHash) = self.delegate.ensResourceURL(ens, url)
|
let (url, base, http_scheme, path_prefix, hasContentHash) = self.delegate.ensResourceURL(ens, url)
|
||||||
result = url_replaceHostAndAddPath(url, (if hasContentHash: base else: url_host(base)), http_scheme, path_prefix)
|
var newHost = url_host(base)
|
||||||
|
if hasContentHash:
|
||||||
|
if strutils.endsWith(base, "/"):
|
||||||
|
newHost = base[.. ^2]
|
||||||
|
else:
|
||||||
|
newHost = base
|
||||||
|
|
||||||
|
result = url_replaceHostAndAddPath(url, newHost, http_scheme, "")
|
||||||
|
@ -199,7 +199,7 @@ Rectangle {
|
|||||||
toastMessage.source = Style.svg("loading")
|
toastMessage.source = Style.svg("loading")
|
||||||
toastMessage.iconColor = Style.current.primary
|
toastMessage.iconColor = Style.current.primary
|
||||||
toastMessage.iconRotates = true
|
toastMessage.iconRotates = true
|
||||||
toastMessage.link = `${WalletStore.etherscanLink}/${result}`
|
toastMessage.link = `${WalletStore.getEtherscanLink()}/${result}`
|
||||||
toastMessage.open()
|
toastMessage.open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,11 @@ QtObject {
|
|||||||
property string defaultCurrency: walletSection.currentCurrency
|
property string defaultCurrency: walletSection.currentCurrency
|
||||||
property string signingPhrase: walletSection.signingPhrase
|
property string signingPhrase: walletSection.signingPhrase
|
||||||
// Not Refactored Yet
|
// Not Refactored Yet
|
||||||
property string etherscanString: ""// walletModel.utilsView.etherscanLink
|
|
||||||
|
function getEtherscanLink() {
|
||||||
|
return profileSectionModule.ensUsernamesModule.getEtherscanLink()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function setDappBrowserAddress() {
|
function setDappBrowserAddress() {
|
||||||
// Not Refactored Yet
|
// Not Refactored Yet
|
||||||
|
Loading…
x
Reference in New Issue
Block a user