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