set proper names for indexed db stores

Signed-off-by: AlienTornadosaurusHex <>
This commit is contained in:
AlienTornadosaurusHex 2023-06-22 22:00:36 +00:00
parent 2623117f17
commit 2cc751f9d2

View File

@ -264,24 +264,24 @@ export default async (ctx, inject) => {
Object.keys(tokens[token].instanceAddress).forEach((amount) => { Object.keys(tokens[token].instanceAddress).forEach((amount) => {
if (nativeCurrency === token && netId === 1) { if (nativeCurrency === token && netId === 1) {
stores.push({ stores.push({
name: `stringify_bloom_${token}_${amount}`, name: `stringify_bloom_${netId}_${token}_${amount}`,
keyPath: 'hashBloom' keyPath: 'hashBloom'
}) })
} }
stores.push( stores.push(
{ {
name: `deposits_${token}_${amount}`, name: `deposits_${netId}_${token}_${amount}`,
keyPath: 'leafIndex', // the key by which it refers to the object must be in all instances of the storage keyPath: 'leafIndex', // the key by which it refers to the object must be in all instances of the storage
indexes: DEPOSIT_INDEXES indexes: DEPOSIT_INDEXES
}, },
{ {
name: `withdrawals_${token}_${amount}`, name: `withdrawals_${netId}_${token}_${amount}`,
keyPath: 'blockNumber', keyPath: 'blockNumber',
indexes: WITHDRAWAL_INDEXES indexes: WITHDRAWAL_INDEXES
}, },
{ {
name: `stringify_tree_${token}_${amount}`, name: `stringify_tree_${netId}_${token}_${amount}`,
keyPath: 'hashTree' keyPath: 'hashTree'
} }
) )