1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

hotfix for asset details (#425)

* was broken in non-web3 browsers
* missed in https://github.com/oceanprotocol/market/pull/421
This commit is contained in:
Matthias Kretschmann 2021-03-05 00:40:13 +01:00 committed by GitHub
parent be82d9ef2e
commit 7356981350
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -36,12 +36,14 @@ export default function EtherscanLink({
const [url, setUrl] = useState<string>() const [url, setUrl] = useState<string>()
useEffect(() => { useEffect(() => {
const networkData = getNetworkData(networksList, networkId) const networkData = networkId
? getNetworkData(networksList, networkId)
: null
const url = const url =
(!networkId && appConfig.network === 'mainnet') || networkId === 1 (!networkId && appConfig.network === 'mainnet') || networkId === 1
? `https://etherscan.io` ? `https://etherscan.io`
: `https://${ : `https://${
networkId ? networkData.network : appConfig.network networkData ? networkData.network : appConfig.network
}.etherscan.io` }.etherscan.io`
setUrl(url) setUrl(url)

View File

@ -8,7 +8,7 @@ import { gql, useQuery } from '@apollo/client'
import { ReceiptData_datatokens_updates as ReceiptData } from '../../../@types/apollo/ReceiptData' import { ReceiptData_datatokens_updates as ReceiptData } from '../../../@types/apollo/ReceiptData'
const getReceipts = gql` const getReceipts = gql`
query ReceiptData($address: String!) { query ReceiptData($address: ID!) {
datatokens(where: { id: $address }) { datatokens(where: { id: $address }) {
createTime createTime
tx tx