mirror of
https://github.com/tornadocash/tornado-classic-ui
synced 2024-02-02 15:04:09 +01:00
fix: init idb
This commit is contained in:
parent
0b4f3b6258
commit
7f1f1f4750
@ -222,7 +222,7 @@ class IndexedDB {
|
||||
}
|
||||
}
|
||||
|
||||
export default (ctx, inject) => {
|
||||
export default async (ctx, inject) => {
|
||||
const instances = new Map()
|
||||
|
||||
const DEPOSIT_INDEXES = [
|
||||
@ -246,7 +246,7 @@ export default (ctx, inject) => {
|
||||
}
|
||||
]
|
||||
|
||||
Object.keys(networkConfig).forEach(async (key) => {
|
||||
for (const key of Object.keys(networkConfig)) {
|
||||
const { tokens, nativeCurrency } = networkConfig[key]
|
||||
|
||||
const netId = Number(key.replace('netId', ''))
|
||||
@ -295,10 +295,10 @@ export default (ctx, inject) => {
|
||||
|
||||
const instance = new IndexedDB(options)
|
||||
|
||||
await instance.initDB()
|
||||
|
||||
instances.set(options.dbName, instance)
|
||||
})
|
||||
|
||||
await instance.initDB()
|
||||
}
|
||||
|
||||
const getInstance = (netId) => instances.get(`tornado_cash_${netId}`)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user