Update explorers
This commit is contained in:
parent
5562db53dc
commit
12dd6cdd34
@ -17,6 +17,7 @@ const CHAINS: NetworkConfig = {
|
|||||||
hexChainId: '0x64',
|
hexChainId: '0x64',
|
||||||
isEipSupported: false,
|
isEipSupported: false,
|
||||||
ensSubdomainKey: 'gnosis-nova',
|
ensSubdomainKey: 'gnosis-nova',
|
||||||
|
blockExplorerUrl: 'https://gnosisscan.io'
|
||||||
},
|
},
|
||||||
[ChainId.MAINNET]: {
|
[ChainId.MAINNET]: {
|
||||||
symbol: 'ETH',
|
symbol: 'ETH',
|
||||||
@ -30,6 +31,7 @@ const CHAINS: NetworkConfig = {
|
|||||||
hexChainId: '0x1',
|
hexChainId: '0x1',
|
||||||
isEipSupported: true,
|
isEipSupported: true,
|
||||||
ensSubdomainKey: 'mainnet-tornado',
|
ensSubdomainKey: 'mainnet-tornado',
|
||||||
|
blockExplorerUrl: 'https://etherscan.io'
|
||||||
},
|
},
|
||||||
[ChainId.BSC]: {
|
[ChainId.BSC]: {
|
||||||
symbol: 'BNB',
|
symbol: 'BNB',
|
||||||
@ -43,6 +45,7 @@ const CHAINS: NetworkConfig = {
|
|||||||
hexChainId: '0x38',
|
hexChainId: '0x38',
|
||||||
isEipSupported: false,
|
isEipSupported: false,
|
||||||
ensSubdomainKey: 'bsc-tornado',
|
ensSubdomainKey: 'bsc-tornado',
|
||||||
|
blockExplorerUrl: 'https://bscscan.com'
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,7 +59,7 @@ const METAMASK_LIST: MetamaskList = {
|
|||||||
symbol: 'BNB',
|
symbol: 'BNB',
|
||||||
decimals: 18,
|
decimals: 18,
|
||||||
},
|
},
|
||||||
blockExplorerUrls: ['https://bscscan.com'],
|
blockExplorerUrls: [CHAINS[ChainId.BSC].blockExplorerUrl],
|
||||||
},
|
},
|
||||||
[ChainId.XDAI]: {
|
[ChainId.XDAI]: {
|
||||||
chainId: '0x64',
|
chainId: '0x64',
|
||||||
@ -67,7 +70,7 @@ const METAMASK_LIST: MetamaskList = {
|
|||||||
symbol: 'xDAI',
|
symbol: 'xDAI',
|
||||||
decimals: 18,
|
decimals: 18,
|
||||||
},
|
},
|
||||||
blockExplorerUrls: ['https://blockscout.com/xdai/mainnet'],
|
blockExplorerUrls: [CHAINS[ChainId.XDAI].blockExplorerUrl],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ import { mapGetters, mapMutations, mapState } from 'vuex'
|
|||||||
import { ApplicationMutation } from '@/types'
|
import { ApplicationMutation } from '@/types'
|
||||||
import { SuccessModal } from '@/modals'
|
import { SuccessModal } from '@/modals'
|
||||||
import { createModalArgs, getEtherscanLink } from '@/utilities'
|
import { createModalArgs, getEtherscanLink } from '@/utilities'
|
||||||
import { numbers, confirmationStatus, confirmationStep, transactionMethods } from '@/constants'
|
import { numbers, confirmationStatus, confirmationStep, transactionMethods, CHAINS } from '@/constants'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ConfirmationModal',
|
name: 'ConfirmationModal',
|
||||||
@ -136,7 +136,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
l2Link() {
|
l2Link() {
|
||||||
return `https://alm-xdai.herokuapp.com/${this.modal.chainId}/${this.txHash}`
|
return getEtherscanLink(this.modal.chainId, this.txHash, 'transaction')
|
||||||
},
|
},
|
||||||
explorerLink() {
|
explorerLink() {
|
||||||
return getEtherscanLink(this.modal.chainId, this.txHash, 'transaction')
|
return getEtherscanLink(this.modal.chainId, this.txHash, 'transaction')
|
||||||
|
@ -30,7 +30,8 @@ export type NetworkConfigItem = {
|
|||||||
blockGasLimit: number
|
blockGasLimit: number
|
||||||
hexChainId: string
|
hexChainId: string
|
||||||
isEipSupported: boolean
|
isEipSupported: boolean
|
||||||
ensSubdomainKey: string
|
ensSubdomainKey: string,
|
||||||
|
blockExplorerUrl: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type MetamaskConfigItem = {
|
export type MetamaskConfigItem = {
|
||||||
|
@ -7,7 +7,7 @@ import { hexDataSlice } from '@ethersproject/bytes'
|
|||||||
import { keccak256 } from '@ethersproject/keccak256'
|
import { keccak256 } from '@ethersproject/keccak256'
|
||||||
import { entropyToMnemonic } from '@ethersproject/hdnode'
|
import { entropyToMnemonic } from '@ethersproject/hdnode'
|
||||||
|
|
||||||
import { numbers } from '@/constants'
|
import { numbers, CHAINS } from '@/constants'
|
||||||
import { ChainId, L1ChainId } from '@/types'
|
import { ChainId, L1ChainId } from '@/types'
|
||||||
import { getBridgeHelper, getMulticall } from '@/contracts'
|
import { getBridgeHelper, getMulticall } from '@/contracts'
|
||||||
import { ArgsProof, ExtData } from '@/services/core/@types'
|
import { ArgsProof, ExtData } from '@/services/core/@types'
|
||||||
@ -74,9 +74,9 @@ export function getEtherscanLink(chainId: ChainId, data: string, type: 'transact
|
|||||||
let prefix = `https://${ETHERSCAN_PREFIXES[chainId]}etherscan.io`
|
let prefix = `https://${ETHERSCAN_PREFIXES[chainId]}etherscan.io`
|
||||||
|
|
||||||
if (chainId === ChainId.BSC) {
|
if (chainId === ChainId.BSC) {
|
||||||
prefix = `https://bscscan.com`
|
prefix = CHAINS[ChainId.BSC].blockExplorerUrl
|
||||||
} else if (chainId === ChainId.XDAI) {
|
} else if (chainId === ChainId.XDAI) {
|
||||||
prefix = `https://blockscout.com/poa/xdai`
|
prefix = CHAINS[ChainId.XDAI].blockExplorerUrl
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
Loading…
Reference in New Issue
Block a user