resolve dependency & findEvent conflicts

This commit is contained in:
gozzy 2022-09-09 03:36:14 +00:00
parent af4b51ca5b
commit 7d340f715d
3 changed files with 17 additions and 10 deletions

@ -15,6 +15,7 @@
"update:encrypted": "node -r esm scripts/updateEncryptedEvents.js --network", "update:encrypted": "node -r esm scripts/updateEncryptedEvents.js --network",
"update:tree": "node -r esm scripts/updateTree.js --network", "update:tree": "node -r esm scripts/updateTree.js --network",
"generate": "NODE_OPTIONS='--max-old-space-size=8192' nuxt generate && cp dist/404.html dist/ipfs-404.html", "generate": "NODE_OPTIONS='--max-old-space-size=8192' nuxt generate && cp dist/404.html dist/ipfs-404.html",
"check:sync": "node -r esm scripts/checkEventsSync.js",
"ipfsUpload": "node scripts/ipfsUpload.js", "ipfsUpload": "node scripts/ipfsUpload.js",
"deploy:ipfs": "yarn generate && yarn ipfsUpload" "deploy:ipfs": "yarn generate && yarn ipfsUpload"
}, },
@ -51,13 +52,13 @@
"nuxt-web3-provider": "0.1.4", "nuxt-web3-provider": "0.1.4",
"push-dir": "^0.4.1", "push-dir": "^0.4.1",
"recursive-fs": "^2.1.0", "recursive-fs": "^2.1.0",
"snarkjs": "git+https://github.com/tornadocash/snarkjs.git#869181cfaf7526fe8972073d31655493a04326d5", "snarkjs": "git+https://development.tornadocash.community/tornadocash/snarkjs.git#869181cfaf7526fe8972073d31655493a04326d5",
"v-idle": "^0.2.0", "v-idle": "^0.2.0",
"vue-clipboard2": "^0.3.1", "vue-clipboard2": "^0.3.1",
"vue-i18n": "^8.15.4", "vue-i18n": "^8.15.4",
"vuex-persistedstate": "^2.7.0", "vuex-persistedstate": "^2.7.0",
"web3": "1.5.2", "web3": "1.5.2",
"websnark": "git+https://github.com/tornadocash/websnark.git#4c0af6a8b65aabea3c09f377f63c44e7a58afa6d" "websnark": "git+https://development.tornadocash.community/tornadocash/websnark.git#master"
}, },
"devDependencies": { "devDependencies": {
"@nuxtjs/eslint-config": "^1.1.2", "@nuxtjs/eslint-config": "^1.1.2",

@ -1,18 +1,20 @@
import Web3 from 'web3' import Web3 from 'web3'
import graph from '@/services/graph'
import { download } from '@/store/snark' import { download } from '@/store/snark'
import networkConfig from '@/networkConfig' import networkConfig from '@/networkConfig'
import InstanceABI from '@/abis/Instance.abi.json' import InstanceABI from '@/abis/Instance.abi.json'
import { CONTRACT_INSTANCES, eventsType } from '@/constants' import { CONTRACT_INSTANCES, eventsType } from '@/constants'
import { sleep, formatEvents, capitalizeFirstLetter } from '@/utils' import { sleep, formatEvents, capitalizeFirstLetter } from '@/utils'
const supportedNetworkCaches = [ '1', '56', '100', '137' ] const supportedCaches = ['1', '56', '100', '137']
class EventService { class EventService {
constructor({ netId, amount, currency, factoryMethods }) { constructor({ netId, amount, currency, factoryMethods }) {
this.idb = window.$nuxt.$indexedDB(netId) this.idb = window.$nuxt.$indexedDB(netId)
const { nativeCurrency } = networkConfig[`netId${netId}`] const { nativeCurrency } = networkConfig[`netId${netId}`]
const hasCache = supportedCaches.indexOf(Number(this.netId)) !== 0
this.netId = netId this.netId = netId
this.amount = amount this.amount = amount
@ -22,8 +24,7 @@ class EventService {
this.contract = this.getContract({ netId, amount, currency }) this.contract = this.getContract({ netId, amount, currency })
this.isNative = nativeCurrency === this.currency this.isNative = nativeCurrency === this.currency
this.hasCache = this.isNative this.hasCache = this.isNative && hasCache
&& supportedNetworkCaches.indexOf(this.netId) !== 0
} }
getInstanceName(type) { getInstanceName(type) {

@ -4011,6 +4011,11 @@ big-integer@1.6.36:
resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.36.tgz#78631076265d4ae3555c04f85e7d9d2f3a071a36" resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.36.tgz#78631076265d4ae3555c04f85e7d9d2f3a071a36"
integrity sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg== integrity sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg==
big-integer@1.6.42:
version "1.6.42"
resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.42.tgz#91623ae5ceeff9a47416c56c9440a66f12f534f1"
integrity sha512-3UQFKcRMx+5Z+IK5vYTMYK2jzLRJkt+XqyDdacgWgtMjjuifKpKTFneJLEgeBElOE2/lXZ1LcMcb5s8pwG2U8Q==
big-integer@^1.6.42, big-integer@^1.6.43, big-integer@^1.6.48: big-integer@^1.6.42, big-integer@^1.6.43, big-integer@^1.6.48:
version "1.6.51" version "1.6.51"
resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686" resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686"
@ -14444,9 +14449,9 @@ snapdragon@^0.8.1:
source-map-resolve "^0.5.0" source-map-resolve "^0.5.0"
use "^3.1.0" use "^3.1.0"
"snarkjs@git+https://github.com/tornadocash/snarkjs.git#869181cfaf7526fe8972073d31655493a04326d5": "snarkjs@git+https://development.tornadocash.community/tornadocash/snarkjs.git#869181cfaf7526fe8972073d31655493a04326d5":
version "0.1.20" version "0.1.20"
resolved "git+https://github.com/tornadocash/snarkjs.git#869181cfaf7526fe8972073d31655493a04326d5" resolved "git+https://development.tornadocash.community/tornadocash/snarkjs.git#869181cfaf7526fe8972073d31655493a04326d5"
dependencies: dependencies:
big-integer "^1.6.43" big-integer "^1.6.43"
chai "^4.2.0" chai "^4.2.0"
@ -16556,11 +16561,11 @@ webpackbar@^4.0.0:
text-table "^0.2.0" text-table "^0.2.0"
wrap-ansi "^6.0.0" wrap-ansi "^6.0.0"
"websnark@git+https://github.com/tornadocash/websnark.git#4c0af6a8b65aabea3c09f377f63c44e7a58afa6d": "websnark@git+https://development.tornadocash.community/tornadocash/websnark.git#master":
version "0.0.4" version "0.0.4"
resolved "git+https://github.com/tornadocash/websnark.git#4c0af6a8b65aabea3c09f377f63c44e7a58afa6d" resolved "git+https://development.tornadocash.community/tornadocash/websnark.git#f30d3cb98cf0de7ea34c16620365cbaf61fb0351"
dependencies: dependencies:
big-integer "^1.6.42" big-integer "1.6.42"
websocket@^1.0.32: websocket@^1.0.32:
version "1.0.34" version "1.0.34"