minor fixes

This commit is contained in:
FreezyDev 2022-10-13 15:50:29 +02:00
parent e051b59a98
commit 7f8f7c2aa1
352 changed files with 49537 additions and 49537 deletions

View file

@ -341,7 +341,7 @@ export default {
if (currency !== this.nativeCurrency) {
this.$store.dispatch('application/setDefaultEthToReceive', { currency })
}
this.$store.dispatch('loading/updateProgress', { progress: 100 })
this.$store.dispatch('loading/updateProgress', { progress: -1 })
this.depositsPast = Number(depositsPast) <= 0 ? 0 : depositsPast
this.depositTxHash = txHash
this.depositTimestamp = timestamp

View file

@ -3,10 +3,10 @@ import ABI from '../abis/Instance.abi.json'
import { loadCachedEvents, getPastEvents } from './helpers'
const EVENTS_PATH = './static/events/'
const enabledChains = ['1', '56', '100', '137' ]
const enabledChains = ['1', '56', '100', '137']
async function main() {
for (let network in enabledChains) {
for (const network in enabledChains) {
const netId = enabledChains[network]
const config = networkConfig[`netId${netId}`]
const { constants, tokens, nativeCurrency, deployedBlock } = config
@ -46,7 +46,6 @@ async function main() {
console.log('- Notes')
console.log('cachedEvents count - ', notesCachedEvents.events.length)
console.log('lastBlock - ', notesCachedEvents.lastBlock)
}
}
}

View file

@ -32,7 +32,7 @@ export async function loadCachedEvents({ name, directory, deployedBlock }) {
return {
events,
lastBlock: events[events.length - 1].blockNumber
lastBlock: events[events.length - 1].blockNumber
}
}
} catch (err) {

View file

@ -2,16 +2,16 @@ import fs from 'fs'
import Jszip from 'jszip'
const compressionConfig = {
type: "nodebuffer",
compression: "DEFLATE",
type: 'nodebuffer',
compression: 'DEFLATE',
compressionOptions: {
level: 9
}
}
const fileConfig = {
binary: true,
compression: "DEFLATE"
binary: true,
compression: 'DEFLATE'
}
export async function save(filePath) {
@ -23,11 +23,12 @@ export async function save(filePath) {
const data = fs.readFileSync(`${filePath}`)
await jszip.file(`${fileName}`, data, fileConfig)
await jszip.generateNodeStream({
...compressionConfig,
streamFiles: true
})
.pipe(fs.createWriteStream(`${filePath}.zip`))
await jszip
.generateNodeStream({
...compressionConfig,
streamFiles: true
})
.pipe(fs.createWriteStream(`${filePath}.zip`))
return true
} catch (err) {

View file

@ -9,7 +9,7 @@ import { loadCachedEvents, getPastEvents } from './helpers'
const EVENTS_PATH = './static/events/'
const EVENTS = ['Deposit', 'Withdrawal']
const enabledChains = ['1', '56', '5', '100', '137' ]
const enabledChains = ['1', '56', '5', '100', '137']
async function main(type, netId) {
const { tokens, nativeCurrency, deployedBlock } = networkConfig[`netId${netId}`]

View file

@ -14,7 +14,7 @@ const TREES_PATH = './static/trees/'
const EVENTS_PATH = './static/events/'
const EVENTS = ['deposit']
const enabledChains = ['1', '56', '100', '137' ]
const enabledChains = ['1', '56', '100', '137']
let mimcHash
const trees = {

View file

@ -58,7 +58,7 @@ async function testCommon(netId, type, filename) {
}
async function main() {
const NETWORKS = [1, 5, 56, 100, 137 ]
const NETWORKS = [1, 5, 56, 100, 137]
for await (const netId of NETWORKS) {
updateEncrypted(netId)

View file

@ -1,48 +1,48 @@
export const state = () => {
return {
message: '',
progress: '',
enabled: false,
type: null
}
return {
message: '',
progress: -1,
enabled: false,
type: null
}
}
export const getters = {}
export const getters = {}
export const mutations = {
ENABLE(state, { message, progress, type }) {
state.message = message
state.enabled = true
state.progress = progress
state.type = type
},
DISABLE(state) {
state.message = ''
state.enabled = false
state.progress = ''
state.type = null
}
export const mutations = {
ENABLE(state, { message, progress, type }) {
state.message = message
state.enabled = true
state.progress = progress
state.type = type
},
DISABLE(state) {
state.message = ''
state.enabled = false
state.progress = -1
state.type = null
}
}
export const actions = {
enable({ commit }, { message = this.app.i18n.t('loading') }) {
commit('ENABLE', { message })
},
changeText({ commit }, { message, type }) {
commit('ENABLE', { message, type })
},
updateProgress({ commit }, { message, progress }) {
commit('ENABLE', { message, progress })
},
disable({ commit }) {
commit('DISABLE')
},
showConfirmLoader({ dispatch, rootState }) {
dispatch('changeText', {
message: this.app.i18n.t('pleaseConfirmTransactionInWallet', {
wallet: rootState.metamask.walletName
}),
type: 'approve'
})
}
export const actions = {
enable({ commit }, { message = this.app.i18n.t('loading') }) {
commit('ENABLE', { message })
},
changeText({ commit }, { message, type }) {
commit('ENABLE', { message, type })
},
updateProgress({ commit }, { message, progress }) {
commit('ENABLE', { message, progress })
},
disable({ commit }) {
commit('DISABLE')
},
showConfirmLoader({ dispatch, rootState }) {
dispatch('changeText', {
message: this.app.i18n.t('pleaseConfirmTransactionInWallet', {
wallet: rootState.metamask.walletName
}),
type: 'approve'
})
}
}