Use Subgraph & Batched Events #3
@ -55,7 +55,6 @@ export default {
|
|||||||
'setProvider',
|
'setProvider',
|
||||||
'changeChain',
|
'changeChain',
|
||||||
'checkNetwork',
|
'checkNetwork',
|
||||||
'checkSanction',
|
|
||||||
'setWalletParams',
|
'setWalletParams',
|
||||||
'getWalletBalance',
|
'getWalletBalance',
|
||||||
]),
|
]),
|
||||||
@ -93,9 +92,6 @@ export default {
|
|||||||
const address = await provider.setupProvider()
|
const address = await provider.setupProvider()
|
||||||
const network = await provider.checkNetworkVersion()
|
const network = await provider.checkNetworkVersion()
|
||||||
|
|
||||||
if (address) {
|
|
||||||
await this.checkSanction(address)
|
|
||||||
}
|
|
||||||
await this.setProvider({ network, name: key })
|
await this.setProvider({ network, name: key })
|
||||||
await this.setAccountData(address)
|
await this.setAccountData(address)
|
||||||
|
|
||||||
@ -126,8 +122,6 @@ export default {
|
|||||||
if (address) {
|
if (address) {
|
||||||
const checksumAddress = toChecksumAddress(address)
|
const checksumAddress = toChecksumAddress(address)
|
||||||
|
|
||||||
await this.checkSanction(checksumAddress)
|
|
||||||
|
|
||||||
if (!this.isConnected) {
|
if (!this.isConnected) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -19,17 +19,6 @@ export const actions: ActionTree<WalletState, RootState> = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async checkSanction({ getters }, address) {
|
|
||||||
const contract = getSanctionList(getters.dependencies.l1ChainId)
|
|
||||||
|
|
||||||
const isSanctioned = await contract.callStatic.isSanctioned(address)
|
|
||||||
if (isSanctioned) {
|
|
||||||
window.onbeforeunload = null
|
|
||||||
// ToDo add type
|
|
||||||
// @ts-expect-error
|
|
||||||
window.location = 'https://twitter.com/TornadoCash/status/1514904975037669386'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
checkAppNetwork({ commit }, network) {
|
checkAppNetwork({ commit }, network) {
|
||||||
try {
|
try {
|
||||||
// TODO create a selector for active network
|
// TODO create a selector for active network
|
||||||
|
Loading…
x
Reference in New Issue
Block a user