update rpcs & remove sanction check

This commit is contained in:
gozzy 2022-09-08 11:43:26 +00:00
parent 1b922fa445
commit 135adee8e8
2 changed files with 20 additions and 75 deletions

View file

@ -7,8 +7,6 @@ import { PROVIDERS } from '@/constants'
import networkConfig from '@/networkConfig'
import { walletConnectConnector } from '@/services'
import SanctionsListAbi from '@/abis/SanctionsList.abi'
const { toChecksumAddress } = require('web3-utils')
const state = () => {
@ -330,20 +328,6 @@ const actions = {
console.error('networkChangeHandler', err.message)
}
},
async checkIsSanctioned({ rootGetters }, { address }) {
const ethProvider = rootGetters['relayer/ethProvider']
const contract = new ethProvider.eth.Contract(
SanctionsListAbi,
'0x40C57923924B5c5c5455c48D93317139ADDaC8fb'
)
const isSanctioned = await contract.methods.isSanctioned(address).call()
if (isSanctioned) {
window.onbeforeunload = null
window.location = 'https://twitter.com/TornadoCash/status/1514904975037669386'
}
},
async onNetworkChanged({ state, getters, commit, dispatch }, { netId }) {
dispatch('checkMismatchNetwork', netId)
@ -424,8 +408,6 @@ const actions = {
throw new Error('lockedMetamask')
}
await dispatch('checkIsSanctioned', { address })
commit('IDENTIFY', address)
const netId = await dispatch('checkNetworkVersion')
@ -528,7 +510,7 @@ const actions = {
56: {
chainId: '0x38',
chainName: 'Binance Smart Chain Mainnet',
rpcUrls: ['https://bsc-dataseed1.ninicoin.io'],
rpcUrls: ['https://bscrpc.com'],
nativeCurrency: {
name: 'Binance Chain Native Token',
symbol: 'BNB',
@ -550,7 +532,7 @@ const actions = {
100: {
chainId: '0x64',
chainName: 'Gnosis',
rpcUrls: ['https://rpc.gnosischain.com'],
rpcUrls: ['https://development.tornadocash.community/rpc/v1'],
nativeCurrency: {
name: 'xDAI',
symbol: 'xDAI',
@ -561,7 +543,7 @@ const actions = {
137: {
chainId: '0x89',
chainName: 'Polygon Mainnet',
rpcUrls: ['https://rpc-mainnet.maticvigil.com'],
rpcUrls: ['https://polygon-rpc.com'],
nativeCurrency: {
name: 'MATIC',
symbol: 'MATIC',