restore legacy awaits
Signed-off-by: AlienTornadosaurusHex <>
This commit is contained in:
parent
6130c46d90
commit
a65389e901
7 changed files with 15 additions and 15 deletions
|
@ -4,7 +4,7 @@ import Web3 from 'web3'
|
|||
|
||||
import networkConfig from '../../networkConfig'
|
||||
|
||||
export function download({ name, directory }) {
|
||||
export async function download({ name, directory }) {
|
||||
const path = `${directory}${name}.gz`.toLowerCase()
|
||||
|
||||
const data = fs.readFileSync(path, { flag: 'as+' })
|
||||
|
@ -13,9 +13,9 @@ export function download({ name, directory }) {
|
|||
return content
|
||||
}
|
||||
|
||||
export function loadCachedEvents({ name, directory, deployedBlock }) {
|
||||
export async function loadCachedEvents({ name, directory, deployedBlock }) {
|
||||
try {
|
||||
const module = download({ contentType: 'string', directory, name })
|
||||
const module = await download({ contentType: 'string', directory, name })
|
||||
|
||||
if (module) {
|
||||
const events = JSON.parse(module)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue